Skip to content

Commit

Permalink
Merge pull request #1039 from mojavelinux/issue-519
Browse files Browse the repository at this point in the history
resolves #519 enable source-to-source navigation for inter-document xrefs
  • Loading branch information
Yuki Izumi authored Apr 3, 2017
2 parents e1f9662 + 05cca0f commit 4998caa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 4998caa

Please sign in to comment.