From cdb0a541554aa4a16fc71b6425225e8c603c83b8 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Thu, 2 Oct 2025 12:03:06 +0200 Subject: feat(markdown): support external link and image (without source) --- mardown/ast.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mardown/ast.go') diff --git a/mardown/ast.go b/mardown/ast.go index 3794ff1..ed4d1f8 100644 --- a/mardown/ast.go +++ b/mardown/ast.go @@ -37,7 +37,7 @@ func (t *tree) String() string { func ast(lxs *lexers) (*tree, error) { tr := new(tree) - newLine := false + newLine := true for lxs.Next() { b, err := getBlock(lxs, newLine) if err != nil { @@ -64,8 +64,8 @@ func getBlock(lxs *lexers, newLine bool) (block, error) { b, err = header(lxs) } case lexerExternal: - if newLine && lxs.Current().Value == "!" { - //TODO: handle + if newLine && lxs.Current().Value == "![" { + b, err = external(lxs) } else { b, err = paragraph(lxs, false) } -- cgit v1.2.3