commit 1d29b052da9d2dd25ca45eef469d216961f60e38 parent 41fbbc2f62efa4c78dc3c33fd55cd01e42c67f8e Author: Lukas Henkel <lh@entf.net> Date: Fri, 19 Feb 2021 21:18:04 +0100 Catch lower bound for headings Diffstat:
M | htmltools.go | | | 2 | ++ |
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/htmltools.go b/htmltools.go @@ -108,6 +108,8 @@ func IndentHeadings(level int, nodes ...*html.Node) error { l += level if l > 6 { l = 6 + } else if l < 1 { + l = 1 } n.Data = fmt.Sprintf("h%d", l) }