Skip to content

Commit

Permalink
change: Move from XHTML to HTML5
Browse files Browse the repository at this point in the history
  • Loading branch information
mrueg committed Oct 18, 2023
1 parent afd15a2 commit 7058bf6
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 7 deletions.
1 change: 0 additions & 1 deletion pkg/mark/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ func CompileMarkdown(markdown []byte, stdlib *stdlib.Lib, path string, mermaidPr
parser.WithAutoHeadingID(),
),
goldmark.WithRendererOptions(
html.WithXHTML(),
html.WithUnsafe(),
))

Expand Down
2 changes: 1 addition & 1 deletion pkg/mark/testdata/links-droph1.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<p><ac:image ac:alt="My External Image"><ri:url ri:value="http://confluence.atlassian.com/images/logo/confluence_48_trans.png?key1=value1&amp;key2=value2"/></ac:image></p>
<p>Use footnotes link <sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<div class="footnotes" role="doc-endnotes">
<hr />
<hr>
<ol>
<li id="fn:1">
<p>a footnote link&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
Expand Down
2 changes: 1 addition & 1 deletion pkg/mark/testdata/links-stripnewlines.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<p><ac:image ac:alt="My External Image"><ri:url ri:value="http://confluence.atlassian.com/images/logo/confluence_48_trans.png?key1=value1&amp;key2=value2"/></ac:image></p>
<p>Use footnotes link <sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<div class="footnotes" role="doc-endnotes">
<hr />
<hr>
<ol>
<li id="fn:1">
<p>a footnote link&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
Expand Down
2 changes: 1 addition & 1 deletion pkg/mark/testdata/links.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<p><ac:image ac:alt="My External Image"><ri:url ri:value="http://confluence.atlassian.com/images/logo/confluence_48_trans.png?key1=value1&amp;key2=value2"/></ac:image></p>
<p>Use footnotes link <sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<div class="footnotes" role="doc-endnotes">
<hr />
<hr>
<ol>
<li id="fn:1">
<p>a footnote link&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
Expand Down
2 changes: 1 addition & 1 deletion pkg/mark/testdata/newlines-droph1.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<p>three-2</p>
<p>space-1
space-2</p>
<p>2space-1<br />
<p>2space-1<br>
2space-2</p>
2 changes: 1 addition & 1 deletion pkg/mark/testdata/newlines-stripnewlines.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<p>three-1</p>
<p>three-2</p>
<p>space-1 space-2</p>
<p>2space-1<br />
<p>2space-1<br>
2space-2</p>
2 changes: 1 addition & 1 deletion pkg/mark/testdata/newlines.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<p>three-2</p>
<p>space-1
space-2</p>
<p>2space-1<br />
<p>2space-1<br>
2space-2</p>
14 changes: 14 additions & 0 deletions pkg/mark/testdata/table-droph1.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,17 @@
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th style="text-align:center">HEADER1</th>
<th style="text-align:right">HEADER2</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">row1</td>
<td style="text-align:right">row2</td>
</tr>
</tbody>
</table>
14 changes: 14 additions & 0 deletions pkg/mark/testdata/table-stripnewlines.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,17 @@
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th style="text-align:center">HEADER1</th>
<th style="text-align:right">HEADER2</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">row1</td>
<td style="text-align:right">row2</td>
</tr>
</tbody>
</table>
14 changes: 14 additions & 0 deletions pkg/mark/testdata/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,17 @@
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th style="text-align:center">HEADER1</th>
<th style="text-align:right">HEADER2</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">row1</td>
<td style="text-align:right">row2</td>
</tr>
</tbody>
</table>
4 changes: 4 additions & 0 deletions pkg/mark/testdata/table.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
|HEADER1|HEADER2|
|---|---|
|row1|row2|

|HEADER1|HEADER2|
|:---:|---:|
|row1|row2|

0 comments on commit 7058bf6

Please sign in to comment.