diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-09-30 22:35:31 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-09-30 22:35:31 +0200 |
| commit | 7b2b9d312791fcf6f49a350f6887a2019d2730f7 (patch) | |
| tree | f932a1f941c927e83fe144aa4d164996bd9db870 /mardown/ast.go | |
| parent | 0426dfc21a0808a25404d3f03d36d1ce4e2efde7 (diff) | |
feat(markdown): quote
Diffstat (limited to 'mardown/ast.go')
| -rw-r--r-- | mardown/ast.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mardown/ast.go b/mardown/ast.go index 298b313..eaafee6 100644 --- a/mardown/ast.go +++ b/mardown/ast.go @@ -42,7 +42,9 @@ func ast(lxs *lexers) (*tree, error) { if err != nil { return nil, err } - tr.blocks = append(tr.blocks, b) + if b != nil { + tr.blocks = append(tr.blocks, b) + } if !lxs.Finished() { newLine = lxs.Current().Type == lexerBreak } @@ -67,6 +69,11 @@ func getBlock(lxs *lexers, newLine bool) (block, error) { b, err = paragraph(lxs, false) } case lexerQuote: + if newLine { + b, err = quote(lxs) + } else { + b, err = paragraph(lxs, false) + } case lexerCode: if newLine && len(lxs.Current().Value) == 3 { //TODO: handle |
