Skip to content

Commit

Permalink
Add source and manual attrs for manpage (PR #2636)
Browse files Browse the repository at this point in the history
Define source and manual refmiscinfo entries if the corresponding
attributes are defined.  For source, we need to define a dumb one
always; otherwise xmlto puts ugly "FIXME".
  • Loading branch information
tiwai authored and mojavelinux committed Mar 29, 2018
1 parent 172d1b9 commit 6b07b0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/asciidoctor/converter/docbook5.rb
Expand Up @@ -730,6 +730,12 @@ def document_info_element doc, info_tag_prefix, use_info_tag_prefix = false
result << '<refmeta>'
result << %(<refentrytitle>#{doc.attr 'mantitle'}</refentrytitle>) if doc.attr? 'mantitle'
result << %(<manvolnum>#{doc.attr 'manvolnum'}</manvolnum>) if doc.attr? 'manvolnum'
if doc.attr? 'mansource'
result << %(<refmiscinfo class="source">#{doc.attr 'mansource'}</refmiscinfo>)
else
result << '<refmiscinfo class="source">&#160;</refmiscinfo>'
end
result << %(<refmiscinfo class="manual">#{doc.attr 'manmanual'}</refmiscinfo>) if doc.attr? 'manmanual'
result << '</refmeta>'
result << '<refnamediv>'
result += (doc.attr 'mannames').map {|n| %(<refname>#{n}</refname>) } if doc.attr? 'mannames'
Expand Down

0 comments on commit 6b07b0b

Please sign in to comment.