Skip to content

Commit

Permalink
feat: strip leading -- from comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Feb 3, 2023
1 parent 1dd249e commit ecea630
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docgen/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,14 @@ for module_name, module in pairs(modules) do
local config_node = docgen.get_module_config_node(buffer, root)

if config_node then
docgen.map_config(buffer, config_node, function(child, comment)

docgen.map_config(buffer, config_node, function(data, comments)
for i, comment in ipairs(comments) do
-- TODO: Also perform @something lookups
comments[i] = comment:gsub("^%s*%-%-+%s*", "")
end

comments = table.concat(comments, "\n")
log.warn(comments)
end)
end
end

0 comments on commit ecea630

Please sign in to comment.