Skip to content

Commit b0f8aed

Browse files
committed
Merge branch 'ma/user-manual-markup-update'
The markup used in user-manual has been updated to work better with asciidoctor. * ma/user-manual-markup-update: user-manual.txt: render ASCII art correctly under Asciidoctor asciidoctor-extensions.rb: handle "book" doctype in linkgit user-manual.txt: change header notation user-manual.txt: add missing section label
2 parents faf5576 + c4d2f61 commit b0f8aed

File tree

2 files changed

+137
-247
lines changed

2 files changed

+137
-247
lines changed

Documentation/asciidoctor-extensions.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ class LinkGitProcessor < Asciidoctor::Extensions::InlineMacroProcessor
99
named :chrome
1010

1111
def process(parent, target, attrs)
12-
if parent.document.basebackend? 'html'
13-
prefix = parent.document.attr('git-relative-html-prefix')
12+
prefix = parent.document.attr('git-relative-html-prefix')
13+
if parent.document.doctype == 'book'
14+
"<ulink url=\"#{prefix}#{target}.html\">" \
15+
"#{target}(#{attrs[1]})</ulink>"
16+
elsif parent.document.basebackend? 'html'
1417
%(<a href="#{prefix}#{target}.html">#{target}(#{attrs[1]})</a>)
1518
elsif parent.document.basebackend? 'docbook'
1619
"<citerefentry>\n" \

0 commit comments

Comments
 (0)