Skip to content

Commit 45351fc

Browse files
committed
Fix block ignored
1 parent 27a0390 commit 45351fc

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

doc/panvimdoc.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@ Table: Demonstration of simple table syntax.
242242

243243
<!-- panvimdoc-ignore-start -->
244244

245+
<details>
246+
<summary>Ignored section</summary>
247+
248+
This section should be ignored.
249+
250+
</details>
251+
245252
Right Left Center Default
246253
------- ------ ---------- -------
247254
12 12 12 12

scripts/panvimdoc.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,7 @@ end
204204

205205
function Link(s, tgt, tit, attr)
206206
if string.starts_with(tgt, "https://neovim.io/doc/") then
207-
if string.starts_with(s, "`") and string.ends_with(s, "`") then
208-
return "|" .. s .. "|"
209-
else
210-
return "|'" .. s .. "'|"
211-
end
207+
return "|" .. s .. "|"
212208
elseif string.starts_with(tgt, "#") then
213209
return "|" .. stringify(meta.project) .. "-" .. s:gsub("%s", "-") .. "|"
214210
elseif string.starts_with(s, "http") then

scripts/skip-blocks.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ function RawBlock(el)
1414
elseif str == "<!-- panvimdoc-ignore-end -->" then
1515
COMMENT = false
1616
end
17+
if COMMENT == true then
18+
return pandoc.Null()
19+
end
1720
return el
1821
end
1922

0 commit comments

Comments
 (0)