From 8c0af18617c0ae4ab49fc5393baf60a127e0f04e Mon Sep 17 00:00:00 2001 From: Yujiri Date: Mon, 14 Mar 2022 06:16:41 +0000 Subject: [PATCH] Fix parsing of list item lines According to section 5.5.2 of the Gemini specification (v0.16.1), the space is mandatory. --- text.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text.go b/text.go index fe37df6..86ba77f 100644 --- a/text.go +++ b/text.go @@ -125,8 +125,8 @@ func ParseLines(r io.Reader, handler func(Line)) error { name = strings.TrimLeft(name, spacetab) line = LineLink{url, name} } - } else if strings.HasPrefix(text, "*") { - text = text[1:] + } else if strings.HasPrefix(text, "* ") { + text = text[2:] text = strings.TrimLeft(text, spacetab) line = LineListItem(text) } else if strings.HasPrefix(text, "###") {