From 02f1e42a7f83f041627eace65675c1d6cea7e8cc Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Wed, 1 Oct 2025 09:55:15 +0200 Subject: feat(markdown): trim space in top level --- mardown/ast.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mardown/ast.go') diff --git a/mardown/ast.go b/mardown/ast.go index 3a16903..55fd3b9 100644 --- a/mardown/ast.go +++ b/mardown/ast.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "html/template" + "strings" ) var ErrUnkownLexType = errors.New("unkown lex type") @@ -91,3 +92,7 @@ func getBlock(lxs *lexers, newLine bool) (block, error) { } return b, err } + +func trimSpace(s template.HTML) template.HTML { + return template.HTML(strings.TrimSpace(string(s))) +} -- cgit v1.2.3