mirror of
https://github.com/inspec/inspec
synced 2024-11-21 20:23:06 +00:00
REFACTOR: Remove repetitive dl closing for subcommands of single command
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
parent
5d9e023828
commit
724b5c5f60
2 changed files with 358 additions and 517 deletions
File diff suppressed because it is too large
Load diff
|
@ -59,7 +59,7 @@ class Markdown
|
|||
end
|
||||
|
||||
def dl(msg)
|
||||
"<dl>\n#{msg}</dl>\n"
|
||||
"<dl>\n#{msg}</dl>\n\n"
|
||||
end
|
||||
|
||||
def ul(msg)
|
||||
|
@ -179,10 +179,10 @@ namespace :docs do # rubocop:disable Metrics/BlockLength
|
|||
.map { |x| x.start_with?("-") ? x : "-" + x }
|
||||
.map { |x| "<code>" + x + "</code>" }
|
||||
msg = "<dt>#{usage.join(", ")}</dt>\n"
|
||||
msg << "<dd> #{opt.description}</dd>\n" if opt.description && !opt.description.empty?
|
||||
list << f.dl(msg)
|
||||
msg << "<dd>#{opt.description}</dd>\n\n" if opt.description && !opt.description.empty?
|
||||
list << msg
|
||||
end.join
|
||||
res << f.ul(list)
|
||||
res << f.dl(list)
|
||||
end
|
||||
|
||||
# FIXME: for some reason we have extra lines in our RST; needs investigation
|
||||
|
|
Loading…
Reference in a new issue