Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ gem "org-ruby", "= 0.9.9"
gem "creole", "~>0.3.6"
gem "wikicloth", "=0.8.3"
gem "twitter-text", "~> 1.14"
gem "asciidoctor", "= 1.5.6.1"
gem "asciidoctor", "~> 2.0.5"
gem "rake"
1 change: 1 addition & 0 deletions lib/github/markups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
'showtitle' => '@',
'idprefix' => '',
'idseparator' => '-',
'sectanchors' => nil,
'docname' => File.basename(filename, (extname = File.extname(filename))),
'docfilesuffix' => extname,
'outfilesuffix' => extname,
Expand Down
4 changes: 3 additions & 1 deletion test/markups/README.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
= Document Title
// sectanchors will be ignored
:sectanchors:

== First Section

Expand All @@ -7,7 +9,7 @@

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

Navigate from {docname}{outfilesuffix} to <<another-document#,another document>>.
Navigate from {docname}{outfilesuffix} to xref:another-document.asciidoc[another document].

== Another Section

Expand Down
4 changes: 4 additions & 0 deletions test/markups/README.hidetitle.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
= Not Shown
:!showtitle:

This test verifies the author can disable the document title by adding `:!showtitle:` to the document header.
3 changes: 3 additions & 0 deletions test/markups/README.hidetitle.asciidoc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div>
<p>This test verifies the author can disable the document title by adding <code>:!showtitle:</code> to the document header.</p>
</div>
15 changes: 15 additions & 0 deletions test/markups/README.toc.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
= Document Title
:toc:
:toc-title: Contents

== Section A

=== Subsection A-1

=== Subsection A-2

== Section B

=== Subsection B-1

=== Subsection B-2
46 changes: 46 additions & 0 deletions test/markups/README.toc.asciidoc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<h1>Document Title</h1>
<div>
<div>Contents</div>
<ul>
<li>
<a href="#section-a">Section A</a>
<ul>
<li><a href="#subsection-a-1">Subsection A-1</a></li>
<li><a href="#subsection-a-2">Subsection A-2</a></li>
</ul>
</li>
<li>
<a href="#section-b">Section B</a>
<ul>
<li><a href="#subsection-b-1">Subsection B-1</a></li>
<li><a href="#subsection-b-2">Subsection B-2</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h2>Section A</h2>
<div>
<div>
<h3>Subsection A-1</h3>

</div>
<div>
<h3>Subsection A-2</h3>

</div>
</div>
</div>
<div>
<h2>Section B</h2>
<div>
<div>
<h3>Subsection B-1</h3>

</div>
<div>
<h3>Subsection B-2</h3>

</div>
</div>
</div>