diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-02-03 18:47:14 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-02-03 18:47:14 +0100 |
| commit | 80adfde3c830f734eb186a294f9d856c2df81593 (patch) | |
| tree | 411ac4659e630be89945036a700592d707d6b05d /markdown | |
| parent | bec5e1d43a516b39d3aceaa022933020f81f2793 (diff) | |
fix(dom): remove trailing slash for void element
was never required for html
Diffstat (limited to 'markdown')
| -rw-r--r-- | markdown/ast_external_test.go | 4 | ||||
| -rw-r--r-- | markdown/ast_paragraph_test.go | 4 | ||||
| -rw-r--r-- | markdown/ast_test.go | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/markdown/ast_external_test.go b/markdown/ast_external_test.go index ec9dd29..feec6b2 100644 --- a/markdown/ast_external_test.go +++ b/markdown/ast_external_test.go @@ -8,7 +8,7 @@ func TestExternal(t *testing.T) { t.Run("combo", test("Hey, [link](href)", `<p>Hey, <a href="href">link</a></p>`)) }) t.Run("image", func(t *testing.T) { - t.Run("simple", test("", `<figure><img alt="image alt" src="image src" /></figure>`)) + t.Run("simple", test("", `<figure><img alt="image alt" src="image src"></figure>`)) t.Run("combo", test(` Avant la source  @@ -16,6 +16,6 @@ source 1 source 2 Hors de la source -`, `<p>Avant la source</p><figure><img alt="image alt" src="image src" /><figcaption>source 1 source 2</figcaption></figure><p>Hors de la source</p>`)) +`, `<p>Avant la source</p><figure><img alt="image alt" src="image src"><figcaption>source 1 source 2</figcaption></figure><p>Hors de la source</p>`)) }) } diff --git a/markdown/ast_paragraph_test.go b/markdown/ast_paragraph_test.go index c18dfc7..91e41f4 100644 --- a/markdown/ast_paragraph_test.go +++ b/markdown/ast_paragraph_test.go @@ -15,10 +15,10 @@ func TestParagraph(t *testing.T) { opt := &Option{Poem: true} t.Run("simple", testWithOptions(opt, "bonsoir", `<p>bonsoir</p>`)) t.Run("one_break", testWithOptions(opt, `bonsoir -world`, `<p>bonsoir<br />world</p>`)) +world`, `<p>bonsoir<br>world</p>`)) t.Run("mult_break", testWithOptions(opt, `bonsoir world -new line`, `<p>bonsoir<br />world</p><p>new line</p>`)) +new line`, `<p>bonsoir<br>world</p><p>new line</p>`)) }) } diff --git a/markdown/ast_test.go b/markdown/ast_test.go index 5e5a4f9..034eeb8 100644 --- a/markdown/ast_test.go +++ b/markdown/ast_test.go @@ -40,22 +40,22 @@ var parsed = ` <ol><li>et maintenant</li><li>elle l'est</li></ol> <ul><li>hehe</li></ul> <figure> -<img alt="Ceci est ma pfp :3" src="https://cdn.anhgelus.world/pfp.jpg" /> +<img alt="Ceci est ma pfp :3" src="https://cdn.anhgelus.world/pfp.jpg"> <figcaption><a href="https://now.anhgelus.world/" target="_blank" rel="noreferer">Ma pfp</a> hehe :D Elle est <b>magnifique</b>, n'est-ce pas ?</figcaption> </figure> ` var parsedPoem = ` <h1>Je suis un titre</h1> -<p>Avec une description classique,<br />sur plusieurs lignes !</p> -<p>Et je peux mettre du texte en <b>gras</b>,<br />en <em>italique</em> et les <b><em>deux en même temps</em></b> !</p> +<p>Avec une description classique,<br>sur plusieurs lignes !</p> +<p>Et je peux mettre du texte en <b>gras</b>,<br>en <em>italique</em> et les <b><em>deux en même temps</em></b> !</p> <div class="quote"><blockquote>Je suis une magnifique citation sur plusieurs lignes</blockquote><p>avec une source</p></div> <div class="quote"><blockquote>qui recommence après !</blockquote><p>qui a elle aussi une source :D</p></div> <ul><li>Ceci est une liste</li><li>pas ordonnée</li></ul> <ol><li>et maintenant</li><li>elle l'est</li></ol> <ul><li>hehe</li></ul> <figure> -<img alt="Ceci est ma pfp :3" src="https://cdn.anhgelus.world/pfp.jpg" /> +<img alt="Ceci est ma pfp :3" src="https://cdn.anhgelus.world/pfp.jpg"> <figcaption><a href="https://now.anhgelus.world/" target="_blank" rel="noreferer">Ma pfp</a> hehe :D Elle est <b>magnifique</b>, n'est-ce pas ?</figcaption> </figure> ` |
