From 60ba340559cbdf8bbe660d35f1f01355c468faca Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Sat, 28 Jan 2023 17:24:33 -0500 Subject: gemtext: allow tabs as link delimiters --- mime/gemtext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mime') 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("#") -- cgit 1.4.1