fix(gen_help_html): ASCII art rendering in docs #35262

Problem:
gen_help_html.lua script misinterprets parts of ASCII diagrams as help tags
(e.g., `|_________|` in `usr_28.txt`). This incorrectly triggered
special alignment-fixing logic that is meant for columnar text.

Signed-off-by: Shashwat Agrawal <shashwatagrawal473@gmail.com>
This commit is contained in:
Shashwat Agrawal
2025-08-12 03:07:26 +05:30
committed by GitHub
parent 7cc07e8383
commit 67fede0fc9

View File

@@ -608,8 +608,8 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
return string.format('<div class="help-li" style="%s">%s</div>', margin, text)
elseif node_name == 'taglink' or node_name == 'optionlink' then
local helppage, tagname, ignored = validate_link(root, opt.buf, opt.fname)
if ignored then
return text
if ignored or not helppage then
return html_esc(node_text(root))
end
local s = ('%s<a href="%s#%s">%s</a>'):format(
ws(),