Skip to content

Commit

Permalink
resolves asciidoctor#441 use arrow as caret for menu path
Browse files Browse the repository at this point in the history
- use arrow (\u203a) as caret for menu path
- introduce menu_caret_content key in theme to control caret content
  • Loading branch information
vogella authored and mojavelinux committed May 24, 2016
1 parent cf8e8c4 commit 1b530ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/themes/default-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ link:
literal:
font_color: b12146
font_family: M+ 1mn
menu_caret_content: " <font size=\"1.15em\"><color rgb=\"b12146\">\u203a</color></font> "
heading:
#font_color: 181818
font_color: $base_font_color
Expand Down
5 changes: 3 additions & 2 deletions lib/asciidoctor-pdf/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1487,10 +1487,11 @@ def convert_inline_kbd node

def convert_inline_menu node
menu = node.attr 'menu'
caret = @theme.menu_caret_content || %( \u203a )
if !(submenus = node.attr 'submenus').empty?
%(<strong>#{[menu, *submenus, (node.attr 'menuitem')] * ' | '}</strong>)
%(<strong>#{[menu, *submenus, (node.attr 'menuitem')] * caret}</strong>)
elsif (menuitem = node.attr 'menuitem')
%(<strong>#{menu} | #{menuitem}</strong>)
%(<strong>#{menu}#{caret}#{menuitem}</strong>)
else
%(<strong>#{menu}</strong>)
end
Expand Down

0 comments on commit 1b530ae

Please sign in to comment.