diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-01 09:55:15 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-01 09:55:15 +0200 |
| commit | 02f1e42a7f83f041627eace65675c1d6cea7e8cc (patch) | |
| tree | 34b01105e6ffa49916d9c6882411fb1590630cc2 /mardown/ast.go | |
| parent | 11e4c0d5e62f5a7f3840a83081567eff33f16fd3 (diff) | |
feat(markdown): trim space in top level
Diffstat (limited to 'mardown/ast.go')
| -rw-r--r-- | mardown/ast.go | 5 |
1 files changed, 5 insertions, 0 deletions
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))) +} |
