aboutsummaryrefslogtreecommitdiff
path: root/mardown/ast_test.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-09-30 22:35:31 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-09-30 22:35:31 +0200
commit7b2b9d312791fcf6f49a350f6887a2019d2730f7 (patch)
treef932a1f941c927e83fe144aa4d164996bd9db870 /mardown/ast_test.go
parent0426dfc21a0808a25404d3f03d36d1ce4e2efde7 (diff)
feat(markdown): quote
Diffstat (limited to 'mardown/ast_test.go')
-rw-r--r--mardown/ast_test.go21
1 files changed, 20 insertions, 1 deletions
diff --git a/mardown/ast_test.go b/mardown/ast_test.go
index b270b18..d9033c2 100644
--- a/mardown/ast_test.go
+++ b/mardown/ast_test.go
@@ -17,7 +17,9 @@ func TestAst(t *testing.T) {
t.Errorf("failed, got %s", c)
t.Logf("lxs: %s\ntree: %s", lxs, tree)
}
- content = "***bon*soir**"
+ content = `
+***bon*soir**
+`
lxs = lex(content)
tree, err = ast(lxs)
if err != nil {
@@ -45,4 +47,21 @@ func TestAst(t *testing.T) {
t.Errorf("failed, got %s", c)
t.Logf("lxs: %s\ntree: %s", lxs, tree)
}
+ content = `
+> Bonsoir, je suis un **code**
+avec une source
+`
+ lxs = lex(content)
+ tree, err = ast(lxs)
+ if err != nil {
+ t.Fatal(err)
+ }
+ c, err = tree.Eval()
+ if err != nil {
+ t.Fatal(err)
+ }
+ if c != `<div class="quote"><blockquote>Bonsoir, je suis un <b>code</b></blockquote><p>avec une source</p></div>` {
+ t.Errorf("failed, got %s", c)
+ t.Logf("lxs: %s\ntree: %s", lxs, tree)
+ }
}