Skip to content

Commit f3321d0

Browse files
chore: skip error logging for block_continuation in pipe_table
1 parent ceff151 commit f3321d0

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## Pre-release
44

5+
### Features
6+
7+
- add footnote icon [ceff151](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/ceff15170c173c9a62ba491ac6449858cbadadf3)
8+
- configurable scope priority [#534](https://github.com/MeanderingProgrammer/render-markdown.nvim/discussions/534)
9+
[e174f52](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/e174f524cd4f07789ef8083fa0e1c3573e7fe328)
10+
- left padding for checkboxes [da260dd](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/da260dd4979d130f0dfc63e824c9cb2433cfded2)
11+
512
## 8.9.0 (2025-10-06)
613

714
### Features

doc/render-markdown.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*render-markdown.txt* For NVIM v0.11.4 Last change: 2025 October 07
1+
*render-markdown.txt* For NVIM v0.11.4 Last change: 2025 October 08
22

33
==============================================================================
44
Table of Contents *render-markdown-table-of-contents*

lua/render-markdown/health.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ local state = require('render-markdown.state')
66
local M = {}
77

88
---@private
9-
M.version = '8.9.3'
9+
M.version = '8.9.4'
1010

1111
function M.check()
1212
M.start('versions')

lua/render-markdown/render/markdown/table.lua

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,18 @@ function Render:setup()
5656
-- ensure delimiter and rows exist
5757
local delim_node = nil ---@type render.md.Node?
5858
local row_nodes = {} ---@type render.md.Node[]
59+
local types = {
60+
delim = 'pipe_table_delimiter_row',
61+
row = { 'pipe_table_header', 'pipe_table_row' },
62+
skip = { 'block_continuation' },
63+
}
5964
self.node:for_each_child(function(node)
60-
if node.type == 'pipe_table_delimiter_row' then
65+
if node.type == types.delim then
6166
delim_node = node
6267
elseif self.context.view:overlaps(node:get()) then
63-
local row_types = { 'pipe_table_header', 'pipe_table_row' }
64-
if vim.tbl_contains(row_types, node.type) then
68+
if vim.tbl_contains(types.row, node.type) then
6569
row_nodes[#row_nodes + 1] = node
66-
else
70+
elseif not vim.tbl_contains(types.skip, node.type) then
6771
log.unhandled(self.context.buf, 'markdown', 'row', node.type)
6872
end
6973
end
@@ -145,13 +149,13 @@ end
145149
---@param node render.md.Node
146150
---@return render.md.table.Alignment
147151
function Render.alignment(node)
148-
local has_left = node:child('pipe_table_align_left') ~= nil
149-
local has_right = node:child('pipe_table_align_right') ~= nil
150-
if has_left and has_right then
152+
local left = node:child('pipe_table_align_left')
153+
local right = node:child('pipe_table_align_right')
154+
if left and right then
151155
return Alignment.center
152-
elseif has_left then
156+
elseif left then
153157
return Alignment.left
154-
elseif has_right then
158+
elseif right then
155159
return Alignment.right
156160
else
157161
return Alignment.default

0 commit comments

Comments
 (0)