From 809db8f324edda08fc5998c8d3880bd4abd1dc2a Mon Sep 17 00:00:00 2001 From: dece Date: Sun, 9 Jan 2022 23:02:48 +0100 Subject: [PATCH] Gemtext: fix link line parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Yes you can use tabs as separators… --- app/src/main/java/dev/lowrespalmtree/comet/Gemtext.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/dev/lowrespalmtree/comet/Gemtext.kt b/app/src/main/java/dev/lowrespalmtree/comet/Gemtext.kt index 4f231c9..fb11c0b 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/Gemtext.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/Gemtext.kt @@ -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()