bug: Tables don't render correctly if the pipe at the end of line is missing
メンテナーはふだん 6 日以内に返信
評価
調査の方向性
報告に示されている Markdown テーブルと提供された pipe_table 設定を使って Neovim で問題を再現し、その後、末尾に pipe がないテーブルを plugin がどのように認識するかを追跡します。既存のテーブル動作を維持したまま例が正しくレンダリングされれば完了です。プロジェクトに該当するテストがある場合は、対象を絞った回帰テストを追加または実行してください。
索引モデルが issue の本文から書いたものです。
説明
Neovim version (nvim -v)
0.12.2
Neovim distribution
LazyVIM
Operating system
Linux (Arch, btw)
Terminal emulator / GUI
Alacritty
Describe the bug
Tables are not rendered correctly if the trailing pipe is omitted.
From GitHub-flawored markdown spec (common mark doesn't have tables):
A leading and trailing pipe is also recommended for clarity of reading, and if there’s otherwise parsing ambiguity.
Recommended - not required.
I usually omit the trailing pipes - the tables look ok in plain text without inserting dozens of empty spaces to align the right border.
Table like this should be valid and render correctly.
It looks good in plain text, without a need to insert dozens of spaces
| state | dscription
|--------|---
| open | port is accessible, and service is listening
| closed | port is accessible, but no service is listening
Expected behavior
Tables without a trailing pipe should be rendered correctly.
Healthcheck output
==============================================================================
render-markdown: 3 ⚠️
render-markdown.nvim [versions] ~
- ✅ OK neovim >= 0.11
- ✅ OK tree-sitter ABI: 15
- ✅ OK plugin: 8.13.0
render-markdown.nvim [configuration] ~
- ✅ OK valid
render-markdown.nvim [tree-sitter markdown] ~
- ✅ OK parser: installed
- ✅ OK ABI: 15
- ✅ OK highlights: ~/.local/share/nvim/site/queries/markdown/highlights.scm
- ✅ OK highlighter: enabled
render-markdown.nvim [tree-sitter markdown_inline] ~
- ✅ OK parser: installed
- ✅ OK ABI: 15
- ✅ OK highlights: ~/.local/share/nvim/site/queries/markdown_inline/highlights.scm
render-markdown.nvim [tree-sitter html] ~
- ✅ OK parser: installed
- ✅ OK ABI: 14
render-markdown.nvim [tree-sitter latex] ~
- ⚠️ WARNING parser: not installed
- ADVICE:
- disable latex support to avoid this warning
require("render-markdown").setup({
latex = { enabled = false },
})
- ⚠️ WARNING ABI: unknown
- ADVICE:
- disable latex support to avoid this warning
require("render-markdown").setup({
latex = { enabled = false },
})
render-markdown.nvim [tree-sitter yaml] ~
- ✅ OK parser: installed
- ✅ OK ABI: 15
render-markdown.nvim [icons] ~
- ✅ OK using: mini.icons
render-markdown.nvim [latex] ~
- ⚠️ WARNING none installed: { "utftex", "latex2text" }
- ADVICE:
- disable latex support to avoid this warning
require("render-markdown").setup({
latex = { enabled = false },
})
render-markdown.nvim [conflicts] ~
- ✅ OK headlines: not installed
- ✅ OK markview: not installed
- ✅ OK obsidian: not installed
Plugin configuration
config {
checkbox = {
bullet = true,
checked = {
icon = ""
},
custom = {
todo = {
rendered = ""
}
},
unchecked = {
icon = ""
}
},
code = {
border = "thin",
right_pad = 1,
width = "block"
},
file_types = {
[2] = "norg",
[3] = "rmd",
[4] = "org",
[5] = "codecompanion"
},
heading = {
icons = { vim.NIL, vim.NIL, vim.NIL, vim.NIL, vim.NIL, vim.NIL }
},
pipe_table = {
border_enabled = false
}
Plugin error log
N/A
Confirmations
- I have updated this plugin to the latest version using my plugin manager
- I have updated all treesitter parsers (:TSUpdate)
- I have provided the text contained in all screenshots as raw text in this issue. This means if there is a screenshot below it is the copy pasted contents of the file in the screenshot. I understand that my issue will be closed if I have not.
Additional information
No response
- 主要言語
- Lua
- スター
- 5.2k
- フォーク
- 145
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MeanderingProgrammer/render-markdown.nvim のほかの issue
-
bug
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
MeanderingProgrammer/render-markdown.nvim#706 ·
メンテナーはふだん 6 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
MeanderingProgrammer/render-markdown.nvim#685 ·
メンテナーはふだん 6 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
MeanderingProgrammer/render-markdown.nvim#656 ·
メンテナーはふだん 6 日以内に返信
MeanderingProgrammer/render-markdown.nvim の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mogenson/PaperWM.spoon#178 ·
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
-
bug ready ticket
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Domktorymysli/vclu#5 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 3 日以内に返信