about summary refs log tree commit diff stats
path: root/doc/mancha.1
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-02-13 21:16:12 +0100
committerbptato <nincsnevem662@gmail.com>2024-02-25 02:46:21 +0100
commit6e98894199442e2213dc89e0c5fe970029f05b65 (patch)
tree57bf69a6fa825d72be1654482e8865b5e9b82829 /doc/mancha.1
parentd41d4803b5ed15b7e8461394ee07ce5ab1de143a (diff)
downloadchawan-6e98894199442e2213dc89e0c5fe970029f05b65.tar.gz
Separate ANSI text decoding from main binary
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.
Diffstat (limited to 'doc/mancha.1')
0 files changed, 0 insertions, 0 deletions
ous revision' href='/ahoang/Nim/blame/compiler/docgen2.nim?h=devel&id=2d8138768af447742e1e2a6058bdb4d9273600c3'>^
3d4084208 ^
36e25a684 ^
3d4084208 ^

2f43fdb83 ^
73c6efdf6 ^
01ab5948a ^
d68181246 ^
01ab5948a ^



d68181246 ^
01ab5948a ^


36e25a684 ^
01ab5948a ^



091c1b307 ^
01ab5948a ^
d68181246 ^
73c6efdf6 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

 
                            








                                                                      
      

                                                                
    


                               



                                              
                                                    
                                                     
                                                              

                          
                   
             
 
                                                    



                       
                                         


                   
                                                             



                 
                                                                                  
 
                                       
         
iler: Trim .nim files trailing whitespace' href='/ahoang/Nim/commit/compiler/magicsys.nim?h=devel&id=d68181246571de5799059cf6402f1c578cd9421c'>d68181246 ^

e25474154 ^

a2c040e3b ^
e25474154 ^
d68181246 ^
e25474154 ^





e2d38a57e ^




e25474154 ^

4d9b2f671 ^
e2d38a57e ^
e25474154 ^


438703f59 ^
e25474154 ^

92b8fac94 ^
e25474154 ^
d68181246 ^
92b8fac94 ^

2900ceae3 ^
4fbba0a65 ^

2900ceae3 ^
c67520a7c ^


a2c040e3b ^
c67520a7c ^





4fbba0a65 ^





2900ceae3 ^


4fbba0a65 ^





7056ceda6 ^




121d4e0fc ^
7056ceda6 ^



121d4e0fc ^
2df9b442c ^
121d4e0fc ^
23ef565a3 ^


121d4e0fc ^
4fbba0a65 ^

b731e6ef1 ^
4fbba0a65 ^






















2df9b442c ^
2900ceae3 ^
a2c040e3b ^

2df9b442c ^
dbf9117c5 ^
92b8fac94 ^
dbf9117c5 ^
e25474154 ^

dbf9117c5 ^

a2c040e3b ^
e25474154 ^

a2c040e3b ^












e25474154 ^
2df9b442c ^
a2c040e3b ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187