Repository: pypa/readme_renderer (language: python)

Issue:
Bug: renderer excludes plain html from readme
# Description

on the pypa warehouse readme files which include plain HTML tags are not rendered correctly. The corresponding HTML section is just omitted. This was not the case a few weeks ago. 

# Expected Outcome

HTML tags of a readme are also rendered.

# Actual Outcome

Plain HTML tags are omitted. 

# Example 

The [swarmlib](https://github.com/HaaLeo/swarmlib#swarmlib) project includes a plain paragraph `<p></p>` in its readme:

```
<p align="middle">
  <img src="https://raw.githubusercontent.com/HaaLeo/swarmlib/master/doc/light_mode.png" width="49%" />
  <img src="https://raw.githubusercontent.com/HaaLeo/swarmlib/master/doc/dark_mode.png" width="49%" /> 
</p>
```

But for the latest release the images are not shown correctly on the pypi homepage.
For [`swarmlib==0.12.1`](https://pypi.org/project/swarmlib/0.12.1/) the images are shown correctly. However, for [`swarmlib==0.13.0`](https://pypi.org/project/swarmlib/0.13.0/) no images are rendered in the readme.
Since swarmlib did not change this section of its readme between the last releases I think the `readme_renderer` causes this issue.


Discussion / hints:
Looks like this is due to a change between [`cmarkgfm==0.4.2`](https://pypi.org/project/cmarkgfm/0.4.2/) and [`cmarkgfm==0.5.0`](https://pypi.org/project/cmarkgfm/0.5.0/), probably around it's "safe rendering" features.

I've rolled back the `cmarkgfm` dependency in https://github.com/pypa/warehouse/pull/8877 for now until we can determine exactly what needs updated.

(cc @theacodes)
Looks like it's this breaking change:

> In version 0.4.0 and earlier, the default behavior is unsafe, as described above. In later versions, the default behavior is safe, and to render potentially unsafe HTML pass the `CMARK_OPT_UNSAFE` option.

Fix patch:
diff --git a/readme_renderer/markdown.py b/readme_renderer/markdown.py
index 93ac34a..ca2f03f 100644
--- a/readme_renderer/markdown.py
+++ b/readme_renderer/markdown.py
@@ -36,9 +36,14 @@
 
 try:
     import cmarkgfm
+    from cmarkgfm.cmark import Options as cmarkgfmOptions
     variants = {
-        "GFM": cmarkgfm.github_flavored_markdown_to_html,
-        "CommonMark": cmarkgfm.markdown_to_html,
+        "GFM": lambda raw: cmarkgfm.github_flavored_markdown_to_html(
+            raw, options=cmarkgfmOptions.CMARK_OPT_UNSAFE
+        ),
+        "CommonMark": lambda raw: cmarkgfm.markdown_to_html(
+            raw, options=cmarkgfmOptions.CMARK_OPT_UNSAFE
+        ),
     }
 except ImportError:
     warnings.warn(_EXTRA_WARNING)
diff --git a/setup.py b/setup.py
index 9cde0bd..49086dd 100644
--- a/setup.py
+++ b/setup.py
@@ -75,7 +75,7 @@
     },
 
     extras_require={
-        "md": "cmarkgfm>=0.2.0",
+        "md": "cmarkgfm>=0.5.0,<0.6.0",
     },
 
     packages=setuptools.find_packages(exclude=["tests", "tests.*"]),


Test patch:
diff --git a/tests/fixtures/test_GFM_001.html b/tests/fixtures/test_GFM_001.html
index 822a121..790359b 100644
--- a/tests/fixtures/test_GFM_001.html
+++ b/tests/fixtures/test_GFM_001.html
@@ -1,12 +1,14 @@
-<table>
-<thead>
-<tr>
-<th>foo</th>
-<th>bar</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>baz</td>
-<td>bim</td>
-</tr></tbody></table>
+<table>
+<thead>
+<tr>
+<th>foo</th>
+<th>bar</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>baz</td>
+<td>bim</td>
+</tr>
+</tbody>
+</table>
diff --git a/tests/fixtures/test_GFM_001.md b/tests/fixtures/test_GFM_001.md
index 157376e..9face4b 100644
--- a/tests/fixtures/test_GFM_001.md
+++ b/tests/fixtures/test_GFM_001.md
@@ -1,3 +1,3 @@
-| foo | bar |
-| --- | --- |
-| baz | bim |
+| foo | bar |
+| --- | --- |
+| baz | bim |
diff --git a/tests/fixtures/test_GFM_002.html b/tests/fixtures/test_GFM_002.html
index abb728a..655a4d3 100644
--- a/tests/fixtures/test_GFM_002.html
+++ b/tests/fixtures/test_GFM_002.html
@@ -1,12 +1,14 @@
-<table>
-<thead>
-<tr>
-<th align="center">abc</th>
-<th align="right">defghi</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="center">bar</td>
-<td align="right">baz</td>
-</tr></tbody></table>
+<table>
+<thead>
+<tr>
+<th align="center">abc</th>
+<th align="right">defghi</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="center">bar</td>
+<td align="right">baz</td>
+</tr>
+</tbody>
+</table>
diff --git a/tests/fixtures/test_GFM_002.md b/tests/fixtures/test_GFM_002.md
index bbd53a9..03566a5 100644
--- a/tests/fixtures/test_GFM_002.md
+++ b/tests/fixtures/test_GFM_002.md
@@ -1,3 +1,3 @@
-| abc | defghi |
-:-: | -----------:
-bar | baz
+| abc | defghi |
+:-: | -----------:
+bar | baz
diff --git a/tests/fixtures/test_GFM_003.html b/tests/fixtures/test_GFM_003.html
index 5ae5a82..8601aeb 100644
--- a/tests/fixtures/test_GFM_003.html
+++ b/tests/fixtures/test_GFM_003.html
@@ -1,13 +1,15 @@
-<table>
-<thead>
-<tr>
-<th>f|oo</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>b <code>|</code> az</td>
-</tr>
-<tr>
-<td>b <strong>|</strong> im</td>
-</tr></tbody></table>
+<table>
+<thead>
+<tr>
+<th>f|oo</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>b <code>|</code> az</td>
+</tr>
+<tr>
+<td>b <strong>|</strong> im</td>
+</tr>
+</tbody>
+</table>
diff --git a/tests/fixtures/test_GFM_003.md b/tests/fixtures/test_GFM_003.md
index b2ffaed..0adf269 100644
--- a/tests/fixtures/test_GFM_003.md
+++ b/tests/fixtures/test_GFM_003.md
@@ -1,4 +1,4 @@
-| f\|oo  |
-| ------ |
-| b `\|` az |
-| b **\|** im |
+| f\|oo  |
+| ------ |
+| b `\|` az |
+| b **\|** im |
diff --git a/tests/fixtures/test_GFM_004.html b/tests/fixtures/test_GFM_004.html
index 0cbffff..5681c5c 100644
--- a/tests/fixtures/test_GFM_004.html
+++ b/tests/fixtures/test_GFM_004.html
@@ -1,15 +1,17 @@
-<table>
-<thead>
-<tr>
-<th>abc</th>
-<th>def</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>bar</td>
-<td>baz</td>
-</tr></tbody></table>
-<blockquote>
-<p>bar</p>
-</blockquote>
+<table>
+<thead>
+<tr>
+<th>abc</th>
+<th>def</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>bar</td>
+<td>baz</td>
+</tr>
+</tbody>
+</table>
+<blockquote>
+<p>bar</p>
+</blockquote>
diff --git a/tests/fixtures/test_GFM_004.md b/tests/fixtures/test_GFM_004.md
index 5862dd6..5f5c7a2 100644
--- a/tests/fixtures/test_GFM_004.md
+++ b/tests/fixtures/test_GFM_004.md
@@ -1,4 +1,4 @@
-| abc | def |
-| --- | --- |
-| bar | baz |
-> bar
+| abc | def |
+| --- | --- |
+| bar | baz |
+> bar
diff --git a/tests/fixtures/test_GFM_005.html b/tests/fixtures/test_GFM_005.html
index 9428d7d..1671c5b 100644
--- a/tests/fixtures/test_GFM_005.html
+++ b/tests/fixtures/test_GFM_005.html
@@ -1,17 +1,19 @@
-<table>
-<thead>
-<tr>
-<th>abc</th>
-<th>def</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>bar</td>
-<td>baz</td>
-</tr>
-<tr>
-<td>bar</td>
-<td></td>
-</tr></tbody></table>
-<p>bar</p>
+<table>
+<thead>
+<tr>
+<th>abc</th>
+<th>def</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>bar</td>
+<td>baz</td>
+</tr>
+<tr>
+<td>bar</td>
+<td></td>
+</tr>
+</tbody>
+</table>
+<p>bar</p>
diff --git a/tests/fixtures/test_GFM_005.md b/tests/fixtures/test_GFM_005.md
index 3a131f1..dcf61b6 100644
--- a/tests/fixtures/test_GFM_005.md
+++ b/tests/fixtures/test_GFM_005.md
@@ -1,6 +1,6 @@
-| abc | def |
-| --- | --- |
-| bar | baz |
-bar
-
-bar
+| abc | def |
+| --- | --- |
+| bar | baz |
+bar
+
+bar
diff --git a/tests/fixtures/test_GFM_006.html b/tests/fixtures/test_GFM_006.html
index e767cc3..4eb426c 100644
--- a/tests/fixtures/test_GFM_006.html
+++ b/tests/fixtures/test_GFM_006.html
@@ -1,3 +1,3 @@
-<p>| abc | def |
-| --- |
-| bar |</p>
+<p>| abc | def |
+| --- |
+| bar |</p>
diff --git a/tests/fixtures/test_GFM_006.md b/tests/fixtures/test_GFM_006.md
index 66abc49..8afcddc 100644
--- a/tests/fixtures/test_GFM_006.md
+++ b/tests/fixtures/test_GFM_006.md
@@ -1,3 +1,3 @@
-| abc | def |
-| --- |
-| bar |
+| abc | def |
+| --- |
+| bar |
diff --git a/tests/fixtures/test_GFM_007.html b/tests/fixtures/test_GFM_007.html
index 60c90d4..cf6de26 100644
--- a/tests/fixtures/test_GFM_007.html
+++ b/tests/fixtures/test_GFM_007.html
@@ -1,16 +1,18 @@
-<table>
-<thead>
-<tr>
-<th>abc</th>
-<th>def</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>bar</td>
-<td></td>
-</tr>
-<tr>
-<td>bar</td>
-<td>baz</td>
-</tr></tbody></table>
+<table>
+<thead>
+<tr>
+<th>abc</th>
+<th>def</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>bar</td>
+<td></td>
+</tr>
+<tr>
+<td>bar</td>
+<td>baz</td>
+</tr>
+</tbody>
+</table>
diff --git a/tests/fixtures/test_GFM_007.md b/tests/fixtures/test_GFM_007.md
index fe28c97..68cc269 100644
--- a/tests/fixtures/test_GFM_007.md
+++ b/tests/fixtures/test_GFM_007.md
@@ -1,4 +1,4 @@
-| abc | def |
-| --- | --- |
-| bar |
-| bar | baz | boo |
+| abc | def |
+| --- | --- |
+| bar |
+| bar | baz | boo |
diff --git a/tests/fixtures/test_GFM_008.html b/tests/fixtures/test_GFM_008.html
index eb552af..18f4a75 100644
--- a/tests/fixtures/test_GFM_008.html
+++ b/tests/fixtures/test_GFM_008.html
@@ -1,7 +1,8 @@
-<table>
-<thead>
-<tr>
-<th>abc</th>
-<th>def</th>
-</tr>
-</thead></table>
+<table>
+<thead>
+<tr>
+<th>abc</th>
+<th>def</th>
+</tr>
+</thead>
+</table>
diff --git a/tests/fixtures/test_GFM_008.md b/tests/fixtures/test_GFM_008.md
index 02f844f..1df6d8f 100644
--- a/tests/fixtures/test_GFM_008.md
+++ b/tests/fixtures/test_GFM_008.md
@@ -1,2 +1,2 @@
-| abc | def |
-| --- | --- |
+| abc | def |
+| --- | --- |
diff --git a/tests/fixtures/test_GFM_009.html b/tests/fixtures/test_GFM_009.html
index b143a3b..3f7e596 100644
--- a/tests/fixtures/test_GFM_009.html
+++ b/tests/fixtures/test_GFM_009.html
@@ -1,1 +1,1 @@
-<p><del>Hi</del> Hello, world!</p>
+<p><del>Hi</del> Hello, world!</p>
diff --git a/tests/fixtures/test_GFM_009.md b/tests/fixtures/test_GFM_009.md
index 51f8c90..0f6d11e 100644
--- a/tests/fixtures/test_GFM_009.md
+++ b/tests/fixtures/test_GFM_009.md
@@ -1,1 +1,1 @@
-~Hi~ Hello, world!
+~Hi~ Hello, world!
diff --git a/tests/fixtures/test_GFM_010.html b/tests/fixtures/test_GFM_010.html
index 5d120fe..9ca0fb3 100644
--- a/tests/fixtures/test_GFM_010.html
+++ b/tests/fixtures/test_GFM_010.html
@@ -1,1 +1,1 @@
-<p>This <del>text</del> is <del>curious</del>.</p>
+<p>This <del>text~~~~ is ~~~~curious</del>.</p>
diff --git a/tests/fixtures/test_GFM_010.md b/tests/fixtures/test_GFM_010.md
index e96f5bc..ae630b5 100644
--- a/tests/fixtures/test_GFM_010.md
+++ b/tests/fixtures/test_GFM_010.md
@@ -1,1 +1,1 @@
-This ~text~~~~ is ~~~~curious~.
+This ~text~~~~ is ~~~~curious~.
diff --git a/tests/fixtures/test_GFM_011.html b/tests/fixtures/test_GFM_011.html
index fa07aaf..0c5d46c 100644
--- a/tests/fixtures/test_GFM_011.html
+++ b/tests/fixtures/test_GFM_011.html
@@ -1,2 +1,2 @@
-<p>This ~~has a</p>
-<p>new paragraph~~.</p>
+<p>This ~~has a</p>
+<p>new paragraph~~.</p>
diff --git a/tests/fixtures/test_GFM_011.md b/tests/fixtures/test_GFM_011.md
index 001c5f0..b5391e6 100644
--- a/tests/fixtures/test_GFM_011.md
+++ b/tests/fixtures/test_GFM_011.md
@@ -1,3 +1,3 @@
-This ~~has a
-
-new paragraph~~.
+This ~~has a
+
+new paragraph~~.
diff --git a/tests/fixtures/test_GFM_012.html b/tests/fixtures/test_GFM_012.html
index 61a6ddc..102433f 100644
--- a/tests/fixtures/test_GFM_012.html
+++ b/tests/fixtures/test_GFM_012.html
@@ -1,1 +1,1 @@
-<p><a href="http://www.commonmark.org" rel="nofollow">www.commonmark.org</a></p>
+<p><a href="http://www.commonmark.org" rel="nofollow">www.commonmark.org</a></p>
diff --git a/tests/fixtures/test_GFM_012.md b/tests/fixtures/test_GFM_012.md
index 9456ada..ea00b69 100644
--- a/tests/fixtures/test_GFM_012.md
+++ b/tests/fixtures/test_GFM_012.md
@@ -1,1 +1,1 @@
-www.commonmark.org
+www.commonmark.org
diff --git a/tests/fixtures/test_GFM_013.html b/tests/fixtures/test_GFM_013.html
index 04753e9..7443a49 100644
--- a/tests/fixtures/test_GFM_013.html
+++ b/tests/fixtures/test_GFM_013.html
@@ -1,1 +1,1 @@
-<p>Visit <a href="http://www.commonmark.org/help" rel="nofollow">www.commonmark.org/help</a> for more information.</p>
+<p>Visit <a href="http://www.commonmark.org/help" rel="nofollow">www.commonmark.org/help</a> for more information.</p>
diff --git a/tests/fixtures/test_GFM_013.md b/tests/fixtures/test_GFM_013.md
index aaf18ce..b26caa1 100644
--- a/tests/fixtures/test_GFM_013.md
+++ b/tests/fixtures/test_GFM_013.md
@@ -1,1 +1,1 @@
-Visit www.commonmark.org/help for more information.
+Visit www.commonmark.org/help for more information.
diff --git a/tests/fixtures/test_GFM_014.html b/tests/fixtures/test_GFM_014.html
index 6bac270..267160d 100644
--- a/tests/fixtures/test_GFM_014.html
+++ b/tests/fixtures/test_GFM_014.html
@@ -1,2 +1,2 @@
-<p>Visit <a href="http://www.commonmark.org" rel="nofollow">www.commonmark.org</a>.</p>
-<p>Visit <a href="http://www.commonmark.org/a.b" rel="nofollow">www.commonmark.org/a.b</a>.</p>
+<p>Visit <a href="http://www.commonmark.org" rel="nofollow">www.commonmark.org</a>.</p>
+<p>Visit <a href="http://www.commonmark.org/a.b" rel="nofollow">www.commonmark.org/a.b</a>.</p>
diff --git a/tests/fixtures/test_GFM_014.md b/tests/fixtures/test_GFM_014.md
index ebac363..40895f9 100644
--- a/tests/fixtures/test_GFM_014.md
+++ b/tests/fixtures/test_GFM_014.md
@@ -1,3 +1,3 @@
-Visit www.commonmark.org.
-
-Visit www.commonmark.org/a.b.
+Visit www.commonmark.org.
+
+Visit www.commonmark.org/a.b.
diff --git a/tests/fixtures/test_GFM_015.html b/tests/fixtures/test_GFM_015.html
index 6534f61..1e1bf42 100644
--- a/tests/fixtures/test_GFM_015.html
+++ b/tests/fixtures/test_GFM_015.html
@@ -1,2 +1,2 @@
-<p><a href="http://www.google.com/search?q=Markup+(business)" rel="nofollow">www.google.com/search?q=Markup+(business)</a></p>
-<p>(<a href="http://www.google.com/search?q=Markup+(business)" rel="nofollow">www.google.com/search?q=Markup+(business)</a>)</p>
+<p><a href="http://www.google.com/search?q=Markup+(business)" rel="nofollow">www.google.com/search?q=Markup+(business)</a></p>
+<p>(<a href="http://www.google.com/search?q=Markup+(business)" rel="nofollow">www.google.com/search?q=Markup+(business)</a>)</p>
diff --git a/tests/fixtures/test_GFM_015.md b/tests/fixtures/test_GFM_015.md
index 7a4cad1..af2c2e8 100644
--- a/tests/fixtures/test_GFM_015.md
+++ b/tests/fixtures/test_GFM_015.md
@@ -1,3 +1,3 @@
-www.google.com/search?q=Markup+(business)
-
-(www.google.com/search?q=Markup+(business))
+www.google.com/search?q=Markup+(business)
+
+(www.google.com/search?q=Markup+(business))
diff --git a/tests/fixtures/test_GFM_016.html b/tests/fixtures/test_GFM_016.html
index d76c1b1..7c33afe 100644
--- a/tests/fixtures/test_GFM_016.html
+++ b/tests/fixtures/test_GFM_016.html
@@ -1,1 +1,1 @@
-<p><a href="http://www.google.com/search?q=(business))+ok" rel="nofollow">www.google.com/search?q=(business))+ok</a></p>
+<p><a href="http://www.google.com/search?q=(business))+ok" rel="nofollow">www.google.com/search?q=(business))+ok</a></p>
diff --git a/tests/fixtures/test_GFM_016.md b/tests/fixtures/test_GFM_016.md
index d5509ce..d314442 100644
--- a/tests/fixtures/test_GFM_016.md
+++ b/tests/fixtures/test_GFM_016.md
@@ -1,1 +1,1 @@
-www.google.com/search?q=(business))+ok
+www.google.com/search?q=(business))+ok
diff --git a/tests/fixtures/test_GFM_017.html b/tests/fixtures/test_GFM_017.html
index 9e00a95..024bfab 100644
--- a/tests/fixtures/test_GFM_017.html
+++ b/tests/fixtures/test_GFM_017.html
@@ -1,2 +1,2 @@
-<p><a href="http://www.google.com/search?q=commonmark&amp;hl=en" rel="nofollow">www.google.com/search?q=commonmark&amp;hl=en</a></p>
-<p><a href="http://www.google.com/search?q=commonmark" rel="nofollow">www.google.com/search?q=commonmark</a>&amp;hl;</p>
+<p><a href="http://www.google.com/search?q=commonmark&amp;hl=en" rel="nofollow">www.google.com/search?q=commonmark&amp;hl=en</a></p>
+<p><a href="http://www.google.com/search?q=commonmark" rel="nofollow">www.google.com/search?q=commonmark</a>&amp;hl;</p>
diff --git a/tests/fixtures/test_GFM_017.md b/tests/fixtures/test_GFM_017.md
index ff996c0..8581bbe 100644
--- a/tests/fixtures/test_GFM_017.md
+++ b/tests/fixtures/test_GFM_017.md
@@ -1,3 +1,3 @@
-www.google.com/search?q=commonmark&hl=en
-
-www.google.com/search?q=commonmark&hl;
+www.google.com/search?q=commonmark&hl=en
+
+www.google.com/search?q=commonmark&hl;
diff --git a/tests/fixtures/test_GFM_018.html b/tests/fixtures/test_GFM_018.html
index a12ebb9..03fb26c 100644
--- a/tests/fixtures/test_GFM_018.html
+++ b/tests/fixtures/test_GFM_018.html
@@ -1,1 +1,1 @@
-<p><a href="http://www.commonmark.org/he" rel="nofollow">www.commonmark.org/he</a>&lt;lp</p>
+<p><a href="http://www.commonmark.org/he" rel="nofollow">www.commonmark.org/he</a>&lt;lp</p>
diff --git a/tests/fixtures/test_GFM_018.md b/tests/fixtures/test_GFM_018.md
index 2c63794..aeb54e9 100644
--- a/tests/fixtures/test_GFM_018.md
+++ b/tests/fixtures/test_GFM_018.md
@@ -1,1 +1,1 @@
-www.commonmark.org/he<lp
+www.commonmark.org/he<lp
diff --git a/tests/fixtures/test_GFM_019.html b/tests/fixtures/test_GFM_019.html
index 4ac9d46..5dd4ff1 100644
--- a/tests/fixtures/test_GFM_019.html
+++ b/tests/fixtures/test_GFM_019.html
@@ -1,3 +1,3 @@
-<p><a href="http://commonmark.org" rel="nofollow">http://commonmark.org</a></p>
-<p>(Visit <a href="https://encrypted.google.com/search?q=Markup+(business)" rel="nofollow">https://encrypted.google.com/search?q=Markup+(business)</a>)</p>
-<p>Anonymous FTP is available at <a>ftp://foo.bar.baz</a>.</p>
+<p><a href="http://commonmark.org" rel="nofollow">http://commonmark.org</a></p>
+<p>(Visit <a href="https://encrypted.google.com/search?q=Markup+(business)" rel="nofollow">https://encrypted.google.com/search?q=Markup+(business)</a>)</p>
+<p>Anonymous FTP is available at <a>ftp://foo.bar.baz</a>.</p>
diff --git a/tests/fixtures/test_GFM_019.md b/tests/fixtures/test_GFM_019.md
index b6f1242..646eb09 100644
--- a/tests/fixtures/test_GFM_019.md
+++ b/tests/fixtures/test_GFM_019.md
@@ -1,5 +1,5 @@
-http://commonmark.org
-
-(Visit https://encrypted.google.com/search?q=Markup+(business))
-
-Anonymous FTP is available at ftp://foo.bar.baz.
+http://commonmark.org
+
+(Visit https://encrypted.google.com/search?q=Markup+(business))
+
+Anonymous FTP is available at ftp://foo.bar.baz.
diff --git a/tests/fixtures/test_GFM_020.html b/tests/fixtures/test_GFM_020.html
index 5904880..3df2b31 100644
--- a/tests/fixtures/test_GFM_020.html
+++ b/tests/fixtures/test_GFM_020.html
@@ -1,1 +1,1 @@
-<p><a href="mailto:foo@bar.baz">foo@bar.baz</a></p>
+<p><a href="mailto:foo@bar.baz">foo@bar.baz</a></p>
diff --git a/tests/fixtures/test_GFM_020.md b/tests/fixtures/test_GFM_020.md
index df200e5..120468f 100644
--- a/tests/fixtures/test_GFM_020.md
+++ b/tests/fixtures/test_GFM_020.md
@@ -1,1 +1,1 @@
-foo@bar.baz
+foo@bar.baz
diff --git a/tests/fixtures/test_GFM_021.html b/tests/fixtures/test_GFM_021.html
index 85ecf64..dbf5bf4 100644
--- a/tests/fixtures/test_GFM_021.html
+++ b/tests/fixtures/test_GFM_021.html
@@ -1,1 +1,1 @@
-<p>hello@mail+xyz.example isn't valid, but <a href="mailto:hello+xyz@mail.example">hello+xyz@mail.example</a> is.</p>
+<p>hello@mail+xyz.example isn't valid, but <a href="mailto:hello+xyz@mail.example">hello+xyz@mail.example</a> is.</p>
diff --git a/tests/fixtures/test_GFM_021.md b/tests/fixtures/test_GFM_021.md
index 50923a1..ce85cf3 100644
--- a/tests/fixtures/test_GFM_021.md
+++ b/tests/fixtures/test_GFM_021.md
@@ -1,1 +1,1 @@
-hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is.
+hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is.
diff --git a/tests/fixtures/test_GFM_022.html b/tests/fixtures/test_GFM_022.html
index 470265d..d92d5e0 100644
--- a/tests/fixtures/test_GFM_022.html
+++ b/tests/fixtures/test_GFM_022.html
@@ -1,4 +1,4 @@
-<p><a href="mailto:a.b-c_d@a.b">a.b-c_d@a.b</a></p>
-<p><a href="mailto:a.b-c_d@a.b">a.b-c_d@a.b</a>.</p>
-<p>a.b-c_d@a.b-</p>
-<p>a.b-c_d@a.b_</p>
+<p><a href="mailto:a.b-c_d@a.b">a.b-c_d@a.b</a></p>
+<p><a href="mailto:a.b-c_d@a.b">a.b-c_d@a.b</a>.</p>
+<p>a.b-c_d@a.b-</p>
+<p>a.b-c_d@a.b_</p>
diff --git a/tests/fixtures/test_GFM_022.md b/tests/fixtures/test_GFM_022.md
index b3bbdd0..d14a60c 100644
--- a/tests/fixtures/test_GFM_022.md
+++ b/tests/fixtures/test_GFM_022.md
@@ -1,7 +1,7 @@
-a.b-c_d@a.b
-
-a.b-c_d@a.b.
-
-a.b-c_d@a.b-
-
-a.b-c_d@a.b_
+a.b-c_d@a.b
+
+a.b-c_d@a.b.
+
+a.b-c_d@a.b-
+
+a.b-c_d@a.b_
diff --git a/tests/fixtures/test_GFM_023.html b/tests/fixtures/test_GFM_023.html
index 21f976a..8b2baa8 100644
--- a/tests/fixtures/test_GFM_023.html
+++ b/tests/fixtures/test_GFM_023.html
@@ -1,5 +1,5 @@
-<p><strong> &lt;title&gt; &lt;style&gt; <em></em></strong></p><strong><em>
-<blockquote>
-  &lt;xmp&gt; is disallowed.  &lt;XMP&gt; is also disallowed.
-</blockquote>
+<p><strong> &lt;title&gt; &lt;style&gt; <em></em></strong></p><strong><em>
+<blockquote>
+  &lt;xmp&gt; is disallowed.  &lt;XMP&gt; is also disallowed.
+</blockquote>
 </em></strong>
\ No newline at end of file
diff --git a/tests/fixtures/test_GFM_023.md b/tests/fixtures/test_GFM_023.md
index 7d53b14..20fa65c 100644
--- a/tests/fixtures/test_GFM_023.md
+++ b/tests/fixtures/test_GFM_023.md
@@ -1,5 +1,5 @@
-<strong> <title> <style> <em>
-
-<blockquote>
-  <xmp> is disallowed.  <XMP> is also disallowed.
-</blockquote>
+<strong> <title> <style> <em>
+
+<blockquote>
+  <xmp> is disallowed.  <XMP> is also disallowed.
+</blockquote>