diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-01 09:43:06 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-01 09:43:06 +0200 |
| commit | c49daa8fe6fdcf1c7fab08ee32f1ff994979c401 (patch) | |
| tree | 6ac743ddd35563893f92f2fcba73907657d36191 /mardown/ast_header.go | |
| parent | b07dd267fc10812f7e94bf6d9be08667537dd331 (diff) | |
fix(markdown): paragraph parse always skip one char
Diffstat (limited to 'mardown/ast_header.go')
| -rw-r--r-- | mardown/ast_header.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mardown/ast_header.go b/mardown/ast_header.go index 28a0a25..64e47ad 100644 --- a/mardown/ast_header.go +++ b/mardown/ast_header.go @@ -27,6 +27,9 @@ func (a *astHeader) Eval() (template.HTML, error) { func header(lxs *lexers) (*astHeader, error) { b := &astHeader{level: uint(len(lxs.Current().Value))} + if !lxs.Next() { + return nil, ErrInvalidHeader + } var err error b.content, err = paragraph(lxs, true) if err != nil { |
