bug: grid border errors when pipe_table.wrap = false
Maintainer thường phản hồi trong vòng 21 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Read lua/render-markdown/render/markdown/table.lua around border_row and the parser logic that populates data.prefixes when wrapping is enabled. Compare the existing grid table test with the proposed wrap = false case, then run the table tests. Done means grid tables render with body separators and no error when wrapping is disabled, including inside list items.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Neovim version (nvim -v)
0.12.6
Neovim distribution
N/A (custom config, vim.pack)
Operating system
macOS 27.2
Terminal emulator / GUI
Any. Reproduced in an automated PTY harness and in the plugin's own test runner.
Describe the bug
With pipe_table.grid = true and pipe_table.wrap = false, rendering a table fails on every pass and the table is never rendered. wrap = false is a documented option (the default grid = true + wrap = true combination works), so the two seem expected to compose.
The error comes from the body separator added by grid: Render:border_row appends the row prefix unconditionally for position == 'body':
attempt to index local 'other' (a nil value)
lua/render-markdown/lib/line.lua:39 in function 'extend'
lua/render-markdown/render/markdown/table.lua:247 in function 'border_row'
lua/render-markdown/render/markdown/table.lua:47 in function 'run'
Parser:parse only fills data.prefixes inside if layout.wrap then, so with wrap = false the table is empty and prefixes[row.node.start_row] is nil.
Reproduction, with pipe_table = { grid = true, wrap = false }:
| A | B |
| --- | --- |
| 1 | 2 |
| 3 | 4 |
The same happens inside a list item, and border_virtual = true does not matter.
Adding a test case that mirrors the existing grid test but with wrap = false reproduces it in the repo test suite:
it('grid without wrap', function()
util.setup.text(lines, { pipe_table = { grid = true, wrap = false } })
...
Expected behavior
Table renders with a separator line between body rows, aligned to the table start column, without errors.
Healthcheck output
render-markdown.nvim [versions] ~
- ✅ OK neovim >= 0.11
- ✅ OK tree-sitter ABI: 15
- ✅ OK plugin: 8.14.12
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 [icons] ~
- ✅ OK using: mini.icons
render-markdown.nvim [conflicts] ~
- ✅ OK headlines: not installed
- ✅ OK markview: not installed
- ✅ OK obsidian: not installed
Plugin configuration
require('render-markdown').setup({
pipe_table = { border_virtual = true, wrap = false, grid = true },
})
Also fails with the minimal config below (no border_virtual):
require('render-markdown').setup({
pipe_table = { wrap = false, grid = true },
})
Plugin error log
Error in command line:
vim.schedule callback: ./lua/render-markdown/lib/line.lua:39: attempt to index local 'other' (a nil value)
stack traceback:
./lua/render-markdown/lib/line.lua:39: in function 'extend'
./lua/render-markdown/render/markdown/table.lua:247: in function 'border_row'
./lua/render-markdown/render/markdown/table.lua:47: in function 'run'
./lua/render-markdown/render/base.lua:21: in function 'execute'
./lua/render-markdown/handler/markdown.lua:58: in function 'callback'
./lua/render-markdown/request/view.lua:76: in function 'callback'
./lua/render-markdown/request/view.lua:88: in function 'query'
./lua/render-markdown/request/view.lua:71: in function 'nodes'
./lua/render-markdown/handler/markdown.lua:55: in function 'parse'
./lua/render-markdown/core/handlers.lua:94: in function 'tree'
./lua/render-markdown/core/handlers.lua:51: in function 'run'
./lua/render-markdown/core/ui.lua:156: in function 'callback'
./lua/render-markdown/request/view.lua:64: in function 'parse'
./lua/render-markdown/core/ui.lua:153: in function 'parse'
./lua/render-markdown/core/ui.lua:126: in function 'render'
./lua/render-markdown/core/ui.lua:112: in function 'run'
./lua/render-markdown/core/ui.lua:78: in function <./lua/render-markdown/core/ui.lua:77>
- Ngôn ngữ chính
- Lua
- Star
- 5.2k
- Fork
- 155
- Merge trung bình
- 5 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MeanderingProgrammer/render-markdown.nvim
-
fix_lsp_window shrinks LSP hover float: nvim_win_text_height already accounts for conceal_linesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MeanderingProgrammer/render-markdown.nvim#720 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 21 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
MeanderingProgrammer/render-markdown.nvim#711 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 21 ngày
-
bug
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
MeanderingProgrammer/render-markdown.nvim#706 ·
Maintainer thường phản hồi trong vòng 21 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
MeanderingProgrammer/render-markdown.nvim#685 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 21 ngày
-
bug: Tables don't render correctly if the pipe at the end of line is missingCó thể đã có người làm @samholmes đã nhận 122 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
MeanderingProgrammer/render-markdown.nvim#673 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 21 ngày
Tất cả issue của MeanderingProgrammer/render-markdown.nvim
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rohit746/pdf-view.nvim#109 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug guide
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement forever
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
openmap-world/openmap#78 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AndyHazz/bookends.koplugin#130 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
carlos-algms/agentic.nvim#336 ·