Skip to content

Commit

Permalink
chore(parser/renderer): verify sample.adoc is supported (#305)
Browse files Browse the repository at this point in the history
With a minor change in the Asciidoctor output:
libasciidoc renders single quotes with the `'` HTML entity,
which produce the same result in the browser.

Fixes #303

Signed-off-by: Xavier Coulon <[email protected]>
  • Loading branch information
xcoulon authored Feb 24, 2019
1 parent 9780fef commit 2e2642e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions pkg/renderer/html5/paragraph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ and here another paragraph
</div>
<div class="paragraph">
<p>and here another paragraph</p>
</div>`
verify(GinkgoT(), expectedResult, actualContent)
})

It("paragraph with single quotes", func() {
actualContent := `a 'subsection' paragraph.`
expectedResult := `<div class="paragraph">
<p>a &#39;subsection&#39; paragraph.</p>
</div>`
verify(GinkgoT(), expectedResult, actualContent)
})
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h2 id="id_section_a">Section A</h2>
<div class="sect2">
<h3 id="id_section_a_subsection">Section A Subsection</h3>
<div class="paragraph">
<p><strong>Section A</strong> 'subsection' paragraph.</p>
<p><strong>Section A</strong> &#39;subsection&#39; paragraph.</p>
</div>
</div>
</div>
Expand Down

0 comments on commit 2e2642e

Please sign in to comment.