From 00cf576245a0479491b99d738dd4e3b26e79ec0e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 9 Mar 2022 13:46:06 +0100 Subject: [PATCH] markdown: make sure we don't ignore headers with trailing whitespace Signed-off-by: Sebastiaan van Stijn --- markdown.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown.go b/markdown.go index 3284923..6460466 100644 --- a/markdown.go +++ b/markdown.go @@ -42,7 +42,7 @@ func getSections(mdString string) map[string]string { } parts := strings.SplitN(s, "\n", 2) if len(parts) == 2 { - sections[strings.ToLower(parts[0])] = parts[1] + sections[strings.ToLower(strings.TrimSpace(parts[0]))] = parts[1] } } return sections