aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Ming <ofseed@foxmail.com>2024-08-06 21:25:31 +0800
committerChristian Clason <c.clason@uni-graz.at>2024-08-06 18:18:34 +0200
commitcc26cf0400286990d553bee993c9b113ca4cbc46 (patch)
tree0f6b7b6c503bbbfab716f80d9f03689baa4fc039
parent93347a67bf913c72ab2c1ba0aa4b26cc4ba6d1a8 (diff)
downloadrneovim-cc26cf0400286990d553bee993c9b113ca4cbc46.tar.gz
rneovim-cc26cf0400286990d553bee993c9b113ca4cbc46.tar.bz2
rneovim-cc26cf0400286990d553bee993c9b113ca4cbc46.zip
fix(docs): do not treat indexes as `short_link`
-rw-r--r--scripts/text_utils.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/text_utils.lua b/scripts/text_utils.lua
index 75b3bfedd5..3569f5a5af 100644
--- a/scripts/text_utils.lua
+++ b/scripts/text_utils.lua
@@ -207,6 +207,8 @@ local function render_md(node, start_indent, indent, text_width, level, is_list)
elseif ntype == 'shortcut_link' then
if node[1].text:find('^<.*>$') then
parts[#parts + 1] = node[1].text
+ elseif node[1].text:find('^%d+$') then
+ vim.list_extend(parts, { '[', node[1].text, ']' })
else
vim.list_extend(parts, { '|', node[1].text, '|' })
end