Broken project to implement a cross-protocol browser in textual
gemtext: allow tabs as link delimiters
Zach DeCook 2023-01-28
parent 241528e · commit 60ba340
-rw-r--r--mime/gemtext.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mime/gemtext.py b/mime/gemtext.py
index 1f1cdfb..9a2a95e 100644
--- a/mime/gemtext.py
+++ b/mime/gemtext.py
@@ -25,8 +25,8 @@ class Gemtext(Static):
elif self.inPre:
self.inPre.mount(Static(line, markup=False))
elif line.startswith("=>"):
- path = line[2:].lstrip().split(' ')[0]
- text = ' '.join(line[2:].lstrip().split(' ')[1:])
+ path = line[2:].lstrip().split(' ')[0].split('\t')[0]
+ text = line[2:].lstrip()[len(path):].lstrip()
self.mount(Button(Text(text or path,overflow="fold"), name=path))
elif line.startswith("#"):
count = line.split(' ')[0][0:3].count("#")