From e20acb05fd33b8fbcfafee4b72734224093c2d20 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Tue, 30 Sep 2025 20:55:02 +0200 Subject: feat(markdown): ast supports modifier --- mardown/ast_paragraph.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'mardown/ast_paragraph.go') diff --git a/mardown/ast_paragraph.go b/mardown/ast_paragraph.go index 04f2086..3c8f985 100644 --- a/mardown/ast_paragraph.go +++ b/mardown/ast_paragraph.go @@ -47,7 +47,11 @@ func paragraph(lxs lexers, oneLine bool) (*astParagraph, error) { case lexerLiteral, lexerHeader: tree.content = append(tree.content, astLiteral(lxs.Current().Value)) case lexerModifier: - //TODO: handle + mod, err := modifier(lxs) + if err != nil { + return nil, err + } + tree.content = append(tree.content, mod) case lexerQuote: //TODO: handle case lexerEscape: @@ -62,7 +66,11 @@ func paragraph(lxs lexers, oneLine bool) (*astParagraph, error) { lxs.current-- // because we do not use it before the next return tree, nil } - //TODO: handle + mod, err := modifier(lxs) + if err != nil { + return nil, err + } + tree.content = append(tree.content, mod) } } return tree, nil -- cgit v1.2.3