Broken project to implement a cross-protocol browser in textual
mimes: only fallback text/ to text mime
| -rwxr-xr-x | browset.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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__": |