lib/asciidoctor/converter/manpage.rb in asciidoctor-2.0.14 vs lib/asciidoctor/converter/manpage.rb in asciidoctor-2.0.15
- old
+ new
@@ -603,15 +603,15 @@
def convert_inline_break node
%(#{node.text}#{LF}#{ESC_FS}br)
end
def convert_inline_button node
- %(#{ESC_BS}fB[#{ESC_BS}0#{node.text}#{ESC_BS}0]#{ESC_BS}fP)
+ %(<#{ESC_BS}fB>[#{ESC_BS}0#{node.text}#{ESC_BS}0]</#{ESC_BS}fP>)
end
def convert_inline_callout node
- %(#{ESC_BS}fB(#{node.text})#{ESC_BS}fP)
+ %(<#{ESC_BS}fB>(#{node.text})<#{ESC_BS}fP>)
end
def convert_inline_footnote node
if (index = node.attr 'index')
%([#{index}])
@@ -627,26 +627,22 @@
def convert_inline_indexterm node
node.type == :visible ? node.text : ''
end
def convert_inline_kbd node
- if (keys = node.attr 'keys').size == 1
- keys[0]
- else
- keys.join %(#{ESC_BS}0+#{ESC_BS}0)
- end
+ %[<#{ESC_BS}f(CR>#{(keys = node.attr 'keys').size == 1 ? keys[0] : (keys.join "#{ESC_BS}0+#{ESC_BS}0")}</#{ESC_BS}fP>]
end
def convert_inline_menu node
caret = %[#{ESC_BS}0#{ESC_BS}(fc#{ESC_BS}0]
menu = node.attr 'menu'
if !(submenus = node.attr 'submenus').empty?
- submenu_path = submenus.map {|item| %(#{ESC_BS}fI#{item}#{ESC_BS}fP) }.join caret
- %(#{ESC_BS}fI#{menu}#{ESC_BS}fP#{caret}#{submenu_path}#{caret}#{ESC_BS}fI#{node.attr 'menuitem'}#{ESC_BS}fP)
+ submenu_path = submenus.map {|item| %(<#{ESC_BS}fI>#{item}</#{ESC_BS}fP>) }.join caret
+ %(<#{ESC_BS}fI>#{menu}</#{ESC_BS}fP>#{caret}#{submenu_path}#{caret}<#{ESC_BS}fI>#{node.attr 'menuitem'}</#{ESC_BS}fP>)
elsif (menuitem = node.attr 'menuitem')
- %(#{ESC_BS}fI#{menu}#{caret}#{menuitem}#{ESC_BS}fP)
+ %(<#{ESC_BS}fI>#{menu}#{caret}#{menuitem}</#{ESC_BS}fP>)
else
- %(#{ESC_BS}fI#{menu}#{ESC_BS}fP)
+ %(<#{ESC_BS}fI>#{menu}</#{ESC_BS}fP>)
end
end
# NOTE use fake XML elements to prevent creating artificial word boundaries
def convert_inline_quoted node