Skip to content

Commit

Permalink
resolves github#519 enable source-to-source navigation for inter-docu…
Browse files Browse the repository at this point in the history
…ment xrefs

- set outfilesuffix=.adoc so inter-document xref links are created between AsciiDoc files
  • Loading branch information
mojavelinux committed Apr 1, 2017
1 parent e1f9662 commit 05cca0f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -10,5 +10,5 @@ gem "rdoc", "~>3.6"
gem "org-ruby", "= 0.9.9"
gem "creole", "~>0.3.6"
gem "wikicloth", "=0.8.3"
gem "asciidoctor", "= 1.5.2"
gem "asciidoctor", "= 1.5.5"
gem "rake"
2 changes: 1 addition & 1 deletion lib/github/markups.rb
Expand Up @@ -29,7 +29,7 @@

markup(::GitHub::Markups::MARKUP_ASCIIDOC, :asciidoctor, /adoc|asc(iidoc)?/, ["AsciiDoc"]) do |content|
Asciidoctor::Compliance.unique_id_start_index = 1
Asciidoctor.convert(content, :safe => :secure, :attributes => %w(showtitle=@ idprefix idseparator=- env=github env-github source-highlighter=html-pipeline))
Asciidoctor.convert(content, :safe => :secure, :attributes => %w(showtitle=@ idprefix idseparator=- outfilesuffix=.adoc env=github env-github source-highlighter=html-pipeline))
end

command(
Expand Down
2 changes: 2 additions & 0 deletions test/markups/README.asciidoc
Expand Up @@ -7,6 +7,8 @@

Refer to <<another-section>> or <<another-section-1>>.

Navigate to <<another-document#,another document>>.

== Another Section

NOTE: Here is some source code.
Expand Down
3 changes: 3 additions & 0 deletions test/markups/README.asciidoc.html
Expand Up @@ -15,6 +15,9 @@ <h2>First Section</h2>
<div>
<p>Refer to <a href="#another-section">Another Section</a> or <a href="#another-section-1">Another Section</a>.</p>
</div>
<div>
<p>Navigate to <a href="another-document.adoc">another document</a>.</p>
</div>
</div>
</div>
<div>
Expand Down

0 comments on commit 05cca0f

Please sign in to comment.