aboutsummaryrefslogtreecommitdiff
path: root/doc/mime.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/mime.html')
-rw-r--r--doc/mime.html59
1 files changed, 30 insertions, 29 deletions
diff --git a/doc/mime.html b/doc/mime.html
index ae136fd..8cb3507 100644
--- a/doc/mime.html
+++ b/doc/mime.html
@@ -72,34 +72,6 @@ local mime = require("mime")
72 72
73<h3 id=high>High-level filters</h3> 73<h3 id=high>High-level filters</h3>
74 74
75<!-- normalize ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
76
77<p class=name id="normalize">
78mime.<b>normalize(</b>[marker]<b>)</b>
79</p>
80
81<p class=description>
82Converts most common end-of-line markers to a specific given marker.
83</p>
84
85<p class=parameters>
86<tt>Marker</tt> is the new marker. It defaults to CRLF, the canonic
87end-of-line marker defined by the MIME standard.
88</p>
89
90<p class=return>
91The function returns a filter that performs the conversion.
92</p>
93
94<p class=note>
95Note: There is no perfect solution to this problem. Different end-of-line
96markers are an evil that will probably plague developers forever.
97This function, however, will work perfectly for text created with any of
98the most common end-of-line markers, i.e. the Mac OS (CR), the Unix (LF),
99or the DOS (CRLF) conventions. Even if the data has mixed end-of-line
100markers, the function will still work well, although it doesn't
101guarantee that the number of empty lines will be correct.
102</p>
103 75
104<!-- decode +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 76<!-- decode +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
105 77
@@ -159,6 +131,35 @@ base64 = ltn12.filter.chain(
159) 131)
160</pre> 132</pre>
161 133
134<!-- normalize ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
135
136<p class=name id="normalize">
137mime.<b>normalize(</b>[marker]<b>)</b>
138</p>
139
140<p class=description>
141Converts most common end-of-line markers to a specific given marker.
142</p>
143
144<p class=parameters>
145<tt>Marker</tt> is the new marker. It defaults to CRLF, the canonic
146end-of-line marker defined by the MIME standard.
147</p>
148
149<p class=return>
150The function returns a filter that performs the conversion.
151</p>
152
153<p class=note>
154Note: There is no perfect solution to this problem. Different end-of-line
155markers are an evil that will probably plague developers forever.
156This function, however, will work perfectly for text created with any of
157the most common end-of-line markers, i.e. the Mac OS (CR), the Unix (LF),
158or the DOS (CRLF) conventions. Even if the data has mixed end-of-line
159markers, the function will still work well, although it doesn't
160guarantee that the number of empty lines will be correct.
161</p>
162
162<!-- stuff +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 163<!-- stuff +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
163 164
164<p class=name id="stuff"> 165<p class=name id="stuff">
@@ -466,7 +467,7 @@ marker.
466<p> 467<p>
467<small> 468<small>
468Last modified by Diego Nehab on <br> 469Last modified by Diego Nehab on <br>
469Thu Apr 20 00:25:44 EDT 2006 470Fri Mar 4 15:19:17 BRT 2016
470</small> 471</small>
471</p> 472</p>
472</center> 473</center>