Gemtext: fix link line parsing
Yes you can use tabs as separators…
This commit is contained in:
parent
afd0b42c83
commit
809db8f324
|
@ -63,7 +63,7 @@ private fun parseLine(line: CharBuffer, isPreformatted: Boolean): Line =
|
|||
line.startsWith(">") -> getCharsFrom(line, 1) // eh empty lines in quotes…
|
||||
.run { if (isBlank()) EmptyLine() else BlockquoteLine(this) }
|
||||
line.startsWith("=>") -> getCharsFrom(line, 2)
|
||||
.split(" ", limit = 2)
|
||||
.split(" ", "\t", limit = 2)
|
||||
.run { LinkLine(get(0), if (size == 2) get(1).trimStart() else "") }
|
||||
isPreformatted -> PreTextLine(line.toString())
|
||||
line.isEmpty() -> EmptyLine()
|
||||
|
|
Reference in a new issue