diff options
| author | Zach DeCook <zachdecook@librem.one> | 2023-01-28 17:24:33 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2023-01-28 17:24:33 -0500 |
| commit | 60ba340559cbdf8bbe660d35f1f01355c468faca (patch) | |
| tree | edb36d0f294e91613a11eb11776e913ed2e09c18 /mime | |
| parent | 241528e32b7614598badcca42b4faee23217bf27 (diff) | |
| download | browset-60ba340559cbdf8bbe660d35f1f01355c468faca.tar.gz | |
gemtext: allow tabs as link delimiters
Diffstat (limited to 'mime')
| -rw-r--r-- | mime/gemtext.py | 4 |
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("#") |
