about summary refs log tree commit diff stats
path: root/src/config/mimetypes.nim
Commit message (Collapse)AuthorAgeFilesLines
* mimetypes: use cmpIgnoreCase for JS typesbptato2024-12-121-1/+1
|
* pager: do not prompt for text typesbptato2024-12-111-0/+3
| | | | we hadn't before, and it's annoying when using cha as a pager
* mimetypes: refactor, use mime.types for inline image extensionsbptato2024-12-051-31/+68
| | | | | | | | | | | | * remove std/streams use from mime.types; mmap and parse directly * use mime.types for inline image extensions * add some jpeg file extensions Latter came up because I was trying to add a format locally and it wouldn't recognize it on images from my file system (i.e. by extension). As a security measure we still do not allow additional extensions for predefined inline image types.
* dom: remove generic JS bindingsbptato2024-08-111-2/+2
| | | | Dispatch manually with fromJS instead.
* fix compilation on 2.0.8bptato2024-07-101-3/+8
|
* Update code stylebptato2024-04-171-1/+1
| | | | | | * separate params with ; (semicolon) instead of , (colon) * reduce screaming snake case use * wrap long lines
* config: parse mime.types/mailcap/urimethodmap inside parseConfigbptato2024-03-181-1/+5
| | | | | | Better (and simpler) than storing them all over the place. extra: change lmDownload text to match w3m
* mimetypes: simplify parseMimeTypesbptato2024-01-271-16/+9
| | | | | * use functions like until * do not call atEnd for every line, use boolean readLine instead
* Use std/* imports everywherebptato2024-01-071-3/+3
|
* twtstr: remove tolower, isWhitespacebptato2023-11-201-2/+3
| | | | | | | | * tolower: strutils toLowerAscii is good enough for the cases where we need it. Also, it's easy to confuse with unicode toLower and vice versa. * isWhitespace: in AsciiWhitespace is more idiomatic. Also has a naming collision with unicode toLower.
* mimetypes: small optimizationbptato2023-08-131-2/+1
|
* Do not replace existing mime typesbptato2023-08-131-1/+2
| | | | | Make mime.types behavior consistent with mailcap: that is, the *first* match counts.
* Add mailcap, mime.types & misc refactoringsbptato2023-08-131-0/+38
* add mailcap: works with copiousoutput, needsterminal, etc. * add mime.types (only works with mailcap) * refactor pipeBuffer * remove "dispatcher" * fix bug in directory display where baseurl would not be used