about summary refs log tree commit diff stats
path: root/doc/mailcap.md
Commit message (Collapse)AuthorAgeFilesLines
* Separate ANSI text decoding from main binarybptato2024-02-251-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handling text/plain as ANSI colored text was problematic for two reasons: * You couldn't actually look at the real source of HTML pages or text files that used ANSI colors in the source. In general, I only want ANSI colors when piping something into my pager, not when viewing any random file. * More importantly, it introduced a separate rendering mode for plaintext documents, which resulted in the problem that only some buffers had DOMs. This made it impossible to add functionality that would operate on the buffer's DOM, to e.g. implement w3m's MARK_URL. Also, it locked us into the horribly inefficient line-based rendering model of entire documents. Now we solve the problem in two separate parts: * text/x-ansi is used automatically for documents received through stdin. A text/x-ansi handler ansi2html converts ANSI formatting to HTML. text/x-ansi is also used for .ans, .asc file extensions. * text/plain is a separate input mode in buffer, which places all text in a single <plaintext> tag. Crucially, this does not invoke the HTML parser; that would eat NUL characters, which we should avoid. One blind spot still remains: copiousoutput used to display ANSI colors, and now it doesn't. To solve this, users can put the x-ansioutput extension field to their mailcap entries, which behaves like x-htmloutput except it first pipes the output into ansi2html.
* Fix for sourcehut markdown parsing, small doc improvementsbptato2023-12-151-8/+2
| | | | hopefully this works
* mailcap: add $MAILCAP_URLbptato2023-12-101-4/+23
| | | | | | This is better than %u as it is backwards compatible (i.e. does not rely on other user agents doing whatever upon encountering an unknown substitution template.)
* improve manpagesbptato2023-09-201-1/+17
|
* mailcap: unquoteCommand improvements/fixesbptato2023-09-161-10/+4
| | | | | | | | * quote substituted URLs, mime types and named attributes too * change quote state: now we use a stack of quote states, new states are pushed/popped when a process substitution is encountered * fix named attribute state (it was incomplete) * remove superfluous tolower statements
* doc: quote semi in mailcap examplebptato2023-08-241-1/+1
| | | | for clarity
* doc: add needsterminal to mailcapbptato2023-08-201-2/+5
|
* mailcap: fix typobptato2023-08-131-1/+1
| | | | It's not quite the same thing :P
* Update docsbptato2023-08-131-4/+15
|
* Add mailcap, mime.types & misc refactoringsbptato2023-08-131-0/+82
* 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