aboutsummaryrefslogtreecommitdiff
path: root/markdown/ast_test.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-12-13 17:15:47 +0000
committerAnhgelus Morhtuuzh <william@herges.fr>2025-12-13 17:15:47 +0000
commit62fa3f77e8215fdaaf72ddb9df4162e0d65148da (patch)
treedbf20dca933996cf253fe2d110d8381b0c407b2d /markdown/ast_test.go
parentae297bbd117835304b298e7d8a2f914111940e77 (diff)
parent48311424ba2eaac254864c008b6d18e8510f827d (diff)
Merge pull request '[Refactor] Replace manual DOM manipulation in markdown by cleaner one' (#2) from refactor/mardown-dom into main
Reviewed-on: https://git.anhgelus.world/anhgelus/small-web/pulls/2
Diffstat (limited to 'markdown/ast_test.go')
-rw-r--r--markdown/ast_test.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/markdown/ast_test.go b/markdown/ast_test.go
index 45eb49d..8f701f4 100644
--- a/markdown/ast_test.go
+++ b/markdown/ast_test.go
@@ -40,18 +40,13 @@ var parsed = `
<ol><li>et maintenant</li><li>elle l&#39;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&#39;est-ce pas ?</figcaption>
</figure>
`
func TestAst(t *testing.T) {
- lxs := lex(raw)
- tree, err := ast(lxs)
- if err != nil {
- t.Fatal(err)
- }
- res, err := tree.Eval(nil)
+ res, err := Parse(raw, nil)
if err != nil {
t.Fatal(err)
}