diff options
| author | Zach DeCook <zachdecook@librem.one> | 2023-01-18 21:03:10 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2023-01-18 21:03:10 -0500 |
| commit | d392500132d51e935cd59aef575cd045af622573 (patch) | |
| tree | c36902ae8eb5c88a43219dd40e587a309de869d5 /browset.py | |
| parent | d1ceb9cf3bb505b5e1a8023930ddd21e99a05f7b (diff) | |
| download | browset-d392500132d51e935cd59aef575cd045af622573.tar.gz | |
mimes: only fallback text/ to text mime
Diffstat (limited to 'browset.py')
| -rwxr-xr-x | browset.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/browset.py b/browset.py index f932996..185fab0 100755 --- a/browset.py +++ b/browset.py @@ -90,8 +90,10 @@ class Browset(App): content = Gemtext(fp=fp, id="content") elif HighlightedCode.can_handle_mime(mime): content = HighlightedCode(fp=fp, id="content", mime=mime) - else: + elif "text/" in mime: content = Plaintext(fp=fp, id="content") + else: + content = Plaintext(fp=["Unhandled mimetype: " + mime], id="content") self.mount(content) if __name__ == "__main__": |
