Skip to content

Commit 5635af3

Browse files
committed
Merge pull request github#427 from mojavelinux/asciidoctor-1.5.2-upgrade
upgrade to Asciidoctor 1.5.2
2 parents 802316b + 16b6ddc commit 5635af3

File tree

4 files changed

+37
-6
lines changed

4 files changed

+37
-6
lines changed

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ gem "rdoc", "~>3.6"
99
gem "org-ruby", "= 0.9.9"
1010
gem "creole", "~>0.3.6"
1111
gem "wikicloth", "=0.8.1", :platforms => :ruby
12-
gem "asciidoctor", "= 0.1.4"
13-
gem "rake"
12+
gem "asciidoctor", "= 1.5.2"
13+
gem "rake"

lib/github/markups.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
end
2727

2828
markup(:asciidoctor, /adoc|asc(iidoc)?/) do |content|
29-
Asciidoctor.render(content, :safe => :secure, :attributes => %w(showtitle idprefix idseparator=- env=github env-github source-highlighter=html-pipeline))
29+
Asciidoctor::Compliance.unique_id_start_index = 1
30+
Asciidoctor.convert(content, :safe => :secure, :attributes => %w(showtitle=@ idprefix idseparator=- env=github env-github source-highlighter=html-pipeline))
3031
end
3132

3233
command(

test/markups/README.asciidoc

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@
55
* One
66
* Two
77

8-
== Second Section
8+
Refer to <<another-section>> or <<another-section-1>>.
9+
10+
== Another Section
911

1012
NOTE: Here is some source code.
1113

1214
```ruby
1315
puts "Hello, World!"
1416
```
17+
18+
* [ ] todo
19+
* [x] done
20+
21+
== Another Section
22+
23+
content

test/markups/README.asciidoc.html

+23-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ <h2>First Section</h2>
1212
</li>
1313
</ul>
1414
</div>
15+
<div>
16+
<p>Refer to <a href="#another-section">Another Section</a> or <a href="#another-section-1">Another Section</a>.</p>
17+
</div>
1518
</div>
1619
</div>
1720
<div>
18-
<h2>Second Section</h2>
21+
<h2>Another Section</h2>
1922
<div>
2023
<div>
2124
<table>
@@ -34,5 +37,23 @@ <h2>Second Section</h2>
3437
<pre lang="ruby"><code>puts "Hello, World!"</code></pre>
3538
</div>
3639
</div>
40+
<div>
41+
<ul>
42+
<li>
43+
<p>❏ todo</p>
44+
</li>
45+
<li>
46+
<p>✓ done</p>
47+
</li>
48+
</ul>
49+
</div>
50+
</div>
51+
</div>
52+
<div>
53+
<h2>Another Section</h2>
54+
<div>
55+
<div>
56+
<p>content</p>
57+
</div>
58+
</div>
3759
</div>
38-
</div>

0 commit comments

Comments
 (0)