diff --git a/org/headline.go b/org/headline.go index 4788f34..23b986f 100644 --- a/org/headline.go +++ b/org/headline.go @@ -56,7 +56,7 @@ func (d *Document) parseHeadline(i int, parentStop stopFn) (int, Node) { } } - if len(text) >= 3 && text[0:2] == "[#" && strings.Contains("ABC", text[2:3]) && text[3] == ']' { + if len(text) >= 4 && text[0:2] == "[#" && strings.Contains("ABC", text[2:3]) && text[3] == ']' { headline.Priority = text[2:3] text = strings.TrimSpace(text[4:]) } diff --git a/org/testdata/misc.html b/org/testdata/misc.html index bc3fd0a..f8b2397 100644 --- a/org/testdata/misc.html +++ b/org/testdata/misc.html @@ -60,7 +60,17 @@ -