aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_help_html.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gen_help_html.lua')
-rw-r--r--scripts/gen_help_html.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/gen_help_html.lua b/scripts/gen_help_html.lua
index e5251b7f25..e5e99b308a 100644
--- a/scripts/gen_help_html.lua
+++ b/scripts/gen_help_html.lua
@@ -489,7 +489,7 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
end
return string.format('<div class="help-para">\n%s\n</div>\n', text)
elseif node_name == 'line' then
- if parent ~= 'codeblock' and (is_blank(text) or is_noise(text, stats.noise_lines)) then
+ if parent ~= 'code' and (is_blank(text) or is_noise(text, stats.noise_lines)) then
return '' -- Discard common "noise" lines.
end
-- XXX: Avoid newlines (too much whitespace) after block elements in old (preformatted) layout.
@@ -535,7 +535,12 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
return s
elseif node_name == 'argument' then
return ('%s<code>{%s}</code>'):format(ws(), text)
+ -- TODO: use language for proper syntax highlighted code blocks
elseif node_name == 'codeblock' then
+ return text
+ elseif node_name == 'language' then
+ return ''
+ elseif node_name == 'code' then
if is_blank(text) then
return ''
end