aboutsummaryrefslogtreecommitdiff
path: root/mardown/ast_header.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-10-01 09:55:15 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-10-01 09:55:15 +0200
commit02f1e42a7f83f041627eace65675c1d6cea7e8cc (patch)
tree34b01105e6ffa49916d9c6882411fb1590630cc2 /mardown/ast_header.go
parent11e4c0d5e62f5a7f3840a83081567eff33f16fd3 (diff)
feat(markdown): trim space in top level
Diffstat (limited to 'mardown/ast_header.go')
-rw-r--r--mardown/ast_header.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/mardown/ast_header.go b/mardown/ast_header.go
index 64e47ad..5b13411 100644
--- a/mardown/ast_header.go
+++ b/mardown/ast_header.go
@@ -22,7 +22,7 @@ func (a *astHeader) Eval() (template.HTML, error) {
if err != nil {
return "", err
}
- return template.HTML(fmt.Sprintf("<h%d>%s</h%d>", a.level, content, a.level)), nil
+ return template.HTML(fmt.Sprintf("<h%d>%s</h%d>", a.level, trimSpace(content), a.level)), nil
}
func header(lxs *lexers) (*astHeader, error) {