mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2024-11-23 00:11:57 +01:00
Fix parsing of list item lines
According to section 5.5.2 of the Gemini specification (v0.16.1), the space is mandatory.
This commit is contained in:
parent
0e0598f086
commit
0db805a1f9
4
text.go
4
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, "###") {
|
||||
|
Loading…
Reference in New Issue
Block a user