Skip to content

Commit c5f25ef

Browse files
fix: skip rendering tables with errors
1 parent a3617d6 commit c5f25ef

File tree

4 files changed

+27
-13
lines changed

4 files changed

+27
-13
lines changed

CHANGELOG.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Pre-release
44

5+
### Bug Fixes
6+
7+
- tables indented and no spaces in cells [#142](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/142)
8+
[a3617d6](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/a3617d61fcf4cec623ee6acb48570589d7ddcb03)
9+
510
## 6.2.0 (2024-08-21)
611

712
### Features
@@ -12,7 +17,7 @@
1217
[7986be4](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/7986be47531d652e950776536987e01dd5b55b94)
1318
- checkbox: position [#140](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/140)
1419
[275f289](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/275f28943ab9ce6017f90bab56c5b5b3c651c269)
15-
- code: independent language padding: [#131](https://github.com/MeanderingProgrammer/render-markdown.nvim/pull/131)
20+
- code: independent language padding [#131](https://github.com/MeanderingProgrammer/render-markdown.nvim/pull/131)
1621
[739d845](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/739d8458d6c5742fbcf96a5961b88670fefa1d53)
1722
- full filetype overrides [952b1c0](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/952b1c077a5967f91228f57a6a4979f86386f3c4)
1823
- basic org-indent-mode behavior [#134](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/134)
@@ -312,29 +317,29 @@
312317

313318
### Features
314319

315-
- Make default icons consistent: [#37](https://github.com/MeanderingProgrammer/render-markdown.nvim/pull/37)
320+
- Make default icons consistent [#37](https://github.com/MeanderingProgrammer/render-markdown.nvim/pull/37)
316321
[7cfe1cf](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/7cfe1cfa3b77f6be955f10f0310d5148edc69688)
317-
- Document known limitations: [#34](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/34)
322+
- Document known limitations [#34](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/34)
318323
[#35](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/35)
319324
[0adb35c](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/0adb35cc190d682d689a1a8415d5980c92708403)
320-
- Add troubleshooting guide: [#38](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/38)
325+
- Add troubleshooting guide [#38](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/38)
321326
[6208fc4](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/6208fc408d444024f5977ea02b83dea8fe177cfa)
322327
- Add note for `vimwiki` users [#39](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/39)
323328
[56ba207](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/56ba207c860fd86250dcfb9d974a2cf67a5792d7)
324-
- Add issue templates: [e353f1f](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/e353f1f566195176b54e2af5b321b517ac240102)
325-
- Add `raw` cell style option: [#40](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/40)
329+
- Add issue templates [e353f1f](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/e353f1f566195176b54e2af5b321b517ac240102)
330+
- Add `raw` cell style option [#40](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/40)
326331
[973a5ac](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/973a5ac8a0a7e8721576d144af8ba5f95c057689)
327-
- Allow custom handlers to extend builtins: [870426e](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/870426ea7efe3c0494f3673db7b3b4cb26135ded)
328-
- Add language icon above code blocks: [6eef62c](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/6eef62ca1ef373943ff812d4bece94477c3402f2)
329-
- Use full modes instead of truncated values, support pending operation: [#43](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/43)
332+
- Allow custom handlers to extend builtins [870426e](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/870426ea7efe3c0494f3673db7b3b4cb26135ded)
333+
- Add language icon above code blocks [6eef62c](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/6eef62ca1ef373943ff812d4bece94477c3402f2)
334+
- Use full modes instead of truncated values, support pending operation [#43](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/43)
330335
[467ad24](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/467ad24c4d74c47f6ad346966a577f87f041f0e7)
331336

332337
### Bug Fixes
333338

334-
- Get mode at time of event instead of callback execution: [#36](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/36)
339+
- Get mode at time of event instead of callback execution [#36](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/36)
335340
[b556210](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/b556210e6c8759b7d23d5bc74c84aaafe2304da4)
336-
- Update health check to work with neovim 0.9.5: [64969bc](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/64969bc94a9d633dc23b59a382cab407c99fecb1)
337-
- Handle block quotes with empty lines: [#41](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/41)
341+
- Update health check to work with neovim 0.9.5 [64969bc](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/64969bc94a9d633dc23b59a382cab407c99fecb1)
342+
- Handle block quotes with empty lines [#41](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/41)
338343
[6f64bf6](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/6f64bf645b817ff493a28925b1872a69d07fc094)
339344

340345
### Contributor Shoutouts

lua/render-markdown/health.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ local M = {}
55

66
---@private
77
---@type string
8-
M.version = '6.2.1'
8+
M.version = '6.2.2'
99

1010
function M.check()
1111
vim.health.start('render-markdown.nvim [version]')

lua/render-markdown/node_info.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ function NodeInfo.sort_inplace(infos)
4545
end)
4646
end
4747

48+
---@return boolean
49+
function NodeInfo:has_error()
50+
return self.node:has_error()
51+
end
52+
4853
---@return integer
4954
function NodeInfo:level()
5055
local level = 0

lua/render-markdown/parser/pipe_table.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ local M = {}
3333
---@param info render.md.NodeInfo
3434
---@return render.md.parsed.PipeTable?
3535
function M.parse(context, info)
36+
if info:has_error() then
37+
return nil
38+
end
39+
3640
---@type render.md.parsed.table.DelimRow?
3741
local delim = nil
3842
---@type render.md.NodeInfo[]

0 commit comments

Comments
 (0)