From baccf109b9d7eb7e95f084579eaea7b6d88b782b Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Tue, 30 Sep 2025 17:40:27 +0200 Subject: feat(markdown): ast for literal and line break support header in header --- mardown/ast_header.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mardown/ast_header.go') diff --git a/mardown/ast_header.go b/mardown/ast_header.go index 540f47f..c7bc85d 100644 --- a/mardown/ast_header.go +++ b/mardown/ast_header.go @@ -16,8 +16,14 @@ func header(lxs lexers) (block, error) { if err != nil { return nil, err } + // if this is a header, just consider it as literal # if h, ok := bl.(*astHeader); ok { - //TODO: handle + var s string + for range h.level { + s += "#" + } + b.content = append(b.content, astLiteral(s)) + b.content = append(b.content, h.content...) } b.content = append(b.content, bl) } -- cgit v1.2.3