maruku 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/marutex +2 -2
- data/docs/maruku.md +25 -15
- data/lib/maruku.rb +6 -2
- data/lib/maruku/parse_block.rb +5 -87
- data/lib/maruku/parse_doc.rb +102 -0
- data/lib/maruku/parse_span.rb +9 -0
- data/lib/maruku/string_utils.rb +13 -12
- data/lib/maruku/to_html.rb +4 -1
- data/lib/maruku/to_latex.rb +1 -1
- data/lib/maruku/to_latex_entities.rb +301 -0
- data/lib/maruku/to_latex_strings.rb +37 -319
- data/lib/maruku/version.rb +1 -1
- data/tests/{abbreviations.md → others/abbreviations.md} +0 -0
- data/tests/{blank.md → others/blank.md} +0 -0
- data/tests/{code.md → others/code.md} +0 -0
- data/tests/{code2.md → others/code2.md} +0 -0
- data/tests/{code3.md → others/code3.md} +0 -0
- data/tests/{email.md → others/email.md} +0 -0
- data/tests/{entities.md → others/entities.md} +0 -0
- data/tests/{escaping.md → others/escaping.md} +0 -0
- data/tests/{extra_dl.md → others/extra_dl.md} +0 -0
- data/tests/{extra_header_id.md → others/extra_header_id.md} +0 -0
- data/tests/{extra_table1.md → others/extra_table1.md} +0 -0
- data/tests/{footnotes.md → others/footnotes.md} +0 -0
- data/tests/{headers.md → others/headers.md} +0 -0
- data/tests/{hrule.md → others/hrule.md} +0 -0
- data/tests/{images.md → others/images.md} +0 -0
- data/tests/{inline_html.md → others/inline_html.md} +0 -0
- data/tests/{links.md → others/links.md} +0 -0
- data/tests/{list1.md → others/list1.md} +0 -0
- data/tests/{list2.md → others/list2.md} +0 -0
- data/tests/{list3.md → others/list3.md} +0 -0
- data/tests/{lists.md → others/lists.md} +0 -0
- data/tests/{lists_ol.md → others/lists_ol.md} +1 -1
- data/tests/{misc_sw.md → others/misc_sw.md} +0 -0
- data/tests/{one.md → others/one.md} +0 -0
- data/tests/{paragraphs.md → others/paragraphs.md} +0 -0
- data/tests/{sss06.md → others/sss06.md} +0 -0
- data/tests/{test.md → others/test.md} +0 -0
- metadata +30 -28
@@ -1,16 +1,44 @@
|
|
1
|
-
require 'rexml/document'
|
2
1
|
|
3
2
|
|
4
3
|
class String
|
4
|
+
|
5
|
+
# These are TeX's special characters
|
6
|
+
LATEX_ADD_SLASH = [ '{', '}', '$', '&', '#', '_', '%'].map{|x|x[0]}
|
7
|
+
|
8
|
+
# These, we transform to {\tt \char<ascii code>}
|
9
|
+
LATEX_TO_CHARCODE = [ '^', '~', '>','<'].map{|x|x[0]}
|
10
|
+
|
11
|
+
def int_to_string(char)
|
12
|
+
tmp = "0"; tmp[0]=char; tmp;
|
13
|
+
end
|
14
|
+
|
15
|
+
def escape_to_latex(s)
|
16
|
+
s2 = ""
|
17
|
+
s.each_byte do |b|
|
18
|
+
if LATEX_TO_CHARCODE.include? b
|
19
|
+
s2 += "{\\tt \\char#{b}}"
|
20
|
+
elsif LATEX_ADD_SLASH.include? b
|
21
|
+
s2 += "\\"
|
22
|
+
s2 += int_to_string(b)
|
23
|
+
elsif b == "\\"[0]
|
24
|
+
# there is no backslash in cmr10 fonts
|
25
|
+
s2 += "$\\backslash$"
|
26
|
+
else
|
27
|
+
s2 += int_to_string(b)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
s2
|
31
|
+
end
|
5
32
|
|
6
33
|
# escapes special characters
|
7
34
|
def to_latex
|
8
35
|
s = self
|
9
|
-
|
10
|
-
s = s
|
11
|
-
|
12
|
-
|
13
|
-
|
36
|
+
|
37
|
+
s = escape_to_latex(s)
|
38
|
+
|
39
|
+
|
40
|
+
# puts "Before: #{s.inspect}"
|
41
|
+
# puts "after: #{s.inspect}"
|
14
42
|
|
15
43
|
OtherGoodies.each do |k, v|
|
16
44
|
s.gsub!(k, v)
|
@@ -21,321 +49,11 @@ class String
|
|
21
49
|
# other things that are good on the eyes
|
22
50
|
OtherGoodies = {
|
23
51
|
/(\s)LaTeX/ => '\1\\LaTeX\\xspace ', # XXX not if already \latex
|
24
|
-
'HTML' => '\\textsc{html}\\xspace ',
|
25
|
-
'PDF' => '\\textsc{pdf}\\xspace '
|
52
|
+
# 'HTML' => '\\textsc{html}\\xspace ',
|
53
|
+
# 'PDF' => '\\textsc{pdf}\\xspace '
|
26
54
|
}
|
27
55
|
|
28
|
-
def String.convert_entities(s)
|
29
|
-
init_tables
|
30
|
-
|
31
|
-
r = s.gsub(/&([\w\d]+);/) do |match|
|
32
|
-
replace = @@entity_to_latex[match]
|
33
|
-
if replace
|
34
|
-
# puts "#{match} -> #{replace}"
|
35
|
-
replace
|
36
|
-
else
|
37
|
-
$stderr.puts "Cannot translate #{match}"
|
38
|
-
match
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
56
|
|
43
|
-
|
44
|
-
# create hash @@entity_to_latex
|
45
|
-
def String.init_tables
|
46
|
-
## why can't I use a class variable?
|
47
|
-
if not $conversion_table_inited
|
48
|
-
doc = Document.new XML_TABLE
|
49
|
-
@@entity_to_latex = {}
|
50
|
-
doc.elements.each("//char") do |c|
|
51
|
-
num = c.attributes['num']
|
52
|
-
name = c.attributes['name']
|
53
|
-
convert = c.attributes['convertTo']
|
54
|
-
|
55
|
-
# add space after commands
|
56
|
-
if convert[0,1] == "\\" then
|
57
|
-
convert += " "
|
58
|
-
end
|
59
|
-
|
60
|
-
convert.gsub!(/^\$/, "\\begin{math}")
|
61
|
-
convert.gsub!(/\$$/, "\\end{math}")
|
62
|
-
|
63
|
-
@@entity_to_latex["&#{num};"] = convert
|
64
|
-
@@entity_to_latex["&#{name};"] = convert
|
65
|
-
|
66
|
-
end
|
67
|
-
# puts @@entity_to_latex.inspect
|
68
|
-
$conversion_table_inited = true
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
# The following is a conversion chart for html elements, courtesy of ??
|
73
|
-
|
74
|
-
XML_TABLE =<<EOF
|
75
|
-
<chars>
|
76
|
-
<char num='913' name='Alpha' convertTo='$A$' />
|
77
|
-
<char num='914' name='Beta' convertTo='$B$' />
|
78
|
-
<char num='915' name='Gamma' convertTo='$\\Gamma$' />
|
79
|
-
<char num='916' name='Delta' convertTo='$\\Delta$' />
|
80
|
-
<char num='917' name='Epsilon' convertTo='$E$' />
|
81
|
-
<char num='918' name='Zeta' convertTo='$Z$' />
|
82
|
-
<char num='919' name='Eta' convertTo='$H$' />
|
83
|
-
<char num='920' name='Theta' convertTo='$\\Theta$' />
|
84
|
-
<char num='921' name='Iota' convertTo='$I$' />
|
85
|
-
|
86
|
-
<char num='922' name='Kappa' convertTo='$K$' />
|
87
|
-
<char num='923' name='Lambda' convertTo='$\\Lambda$' />
|
88
|
-
<char num='924' name='Mu' convertTo='$M$' />
|
89
|
-
<char num='925' name='Nu' convertTo='$N$' />
|
90
|
-
<char num='926' name='Xi' convertTo='$\\Xi$' />
|
91
|
-
<char num='927' name='Omicron' convertTo='$O$' />
|
92
|
-
<char num='928' name='Pi' convertTo='$\\Pi$' />
|
93
|
-
<char num='929' name='Rho' convertTo='$P$' />
|
94
|
-
<char num='931' name='Sigma' convertTo='$\\Sigma$' />
|
95
|
-
|
96
|
-
<char num='932' name='Tau' convertTo='$T$' />
|
97
|
-
<char num='933' name='Upsilon' convertTo='$Y$' />
|
98
|
-
<char num='934' name='Phi' convertTo='$\\Phi$' />
|
99
|
-
<char num='935' name='Chi' convertTo='$X$' />
|
100
|
-
<char num='936' name='Psi' convertTo='$\\Psi$' />
|
101
|
-
<char num='937' name='Omega' convertTo='$\\Omega$' />
|
102
|
-
<char num='945' name='alpha' convertTo='$\\alpha$' />
|
103
|
-
<char num='946' name='beta' convertTo='$\\beta$' />
|
104
|
-
<char num='947' name='gamma' convertTo='$\\gamma$' />
|
105
|
-
|
106
|
-
<char num='948' name='delta' convertTo='$\\delta$' />
|
107
|
-
<char num='949' name='epsilon' convertTo='$\\epsilon$' />
|
108
|
-
<char num='950' name='zeta' convertTo='$\\zeta$' />
|
109
|
-
<char num='951' name='eta' convertTo='$\\eta$' />
|
110
|
-
<char num='952' name='theta' convertTo='$\\theta$' />
|
111
|
-
<char num='953' name='iota' convertTo='$\\iota$' />
|
112
|
-
<char num='954' name='kappa' convertTo='$\\kappa$' />
|
113
|
-
<char num='955' name='lambda' convertTo='$\\lambda$' />
|
114
|
-
<char num='956' name='mu' convertTo='$\\mu$' />
|
115
|
-
|
116
|
-
<char num='957' name='nu' convertTo='$\\nu$' />
|
117
|
-
<char num='958' name='xi' convertTo='$\\xi$' />
|
118
|
-
<char num='959' name='omicron' convertTo='$o$' />
|
119
|
-
<char num='960' name='pi' convertTo='$\\pi$' />
|
120
|
-
<char num='961' name='rho' convertTo='$\\rho$' />
|
121
|
-
<char num='963' name='sigma' convertTo='$\\sigma$' />
|
122
|
-
<char num='964' name='tau' convertTo='$\\tau$' />
|
123
|
-
<char num='965' name='upsilon' convertTo='$\\upsilon$' />
|
124
|
-
<char num='966' name='phi' convertTo='$\\phi$' />
|
125
|
-
|
126
|
-
<char num='967' name='chi' convertTo='$\\chi$' />
|
127
|
-
<char num='968' name='psi' convertTo='$\\psi$' />
|
128
|
-
<char num='969' name='omega' convertTo='$\\omega$' />
|
129
|
-
<char num='962' name='sigmaf' convertTo='$\\varsigma$' />
|
130
|
-
<char num='977' name='thetasym' convertTo='$\\vartheta$' />
|
131
|
-
<char num='982' name='piv' convertTo='$\\varpi$' />
|
132
|
-
<char num='8230' name='hellip' convertTo='\\ldots' />
|
133
|
-
<char num='8242' name='prime' convertTo='$\\prime$' />
|
134
|
-
<char num='8254' name='oline' convertTo='-' />
|
135
|
-
|
136
|
-
<char num='8260' name='frasl' convertTo='/' />
|
137
|
-
<char num='8472' name='weierp' convertTo='$\\wp$' />
|
138
|
-
<char num='8465' name='image' convertTo='$\\Im$' />
|
139
|
-
<char num='8476' name='real' convertTo='$\\Re$' />
|
140
|
-
<char num='8501' name='alefsym' convertTo='$\\aleph$' />
|
141
|
-
<char num='8226' name='bull' convertTo='$\\bullet$' />
|
142
|
-
<char num='8482' name='trade' convertTo='$^{\\rm TM}$' /> <!-- \texttrademark -->
|
143
|
-
<char num='8592' name='larr' convertTo='$\\leftarrow$' />
|
144
|
-
|
145
|
-
<char num='8594' name='rarr' convertTo='$\\rightarrow$' />
|
146
|
-
<char num='8593' name='uarr' convertTo='$\\uparrow$' />
|
147
|
-
<char num='8595' name='darr' convertTo='$\\downarrow$' />
|
148
|
-
<char num='8596' name='harr' convertTo='$\\leftrightarrow$' />
|
149
|
-
<char num='8629' name='crarr' convertTo='$\\hookleftarrow$' />
|
150
|
-
<char num='8657' name='uArr' convertTo='$\\Uparrow$' />
|
151
|
-
<char num='8659' name='dArr' convertTo='$\\Downarrow$' />
|
152
|
-
<char num='8656' name='lArr' convertTo='$\\Leftarrow$' />
|
153
|
-
<char num='8658' name='rArr' convertTo='$\\Rightarrow$' />
|
154
|
-
|
155
|
-
<char num='8660' name='hArr' convertTo='$\\Leftrightarrow$' />
|
156
|
-
<char num='8704' name='forall' convertTo='$\\forall$' />
|
157
|
-
<char num='8706' name='part' convertTo='$\\partial$' />
|
158
|
-
<char num='8707' name='exist' convertTo='$\\exists$' />
|
159
|
-
<char num='8709' name='empty' convertTo='$\\emptyset$' />
|
160
|
-
<char num='8711' name='nabla' convertTo='$\\nabla$' />
|
161
|
-
<char num='8712' name='isin' convertTo='$\\in$' />
|
162
|
-
<char num='8715' name='ni' convertTo='$\\ni$' />
|
163
|
-
<char num='8713' name='notin' convertTo='$\\notin$' />
|
164
|
-
|
165
|
-
<char num='8721' name='sum' convertTo='$\\sum$' />
|
166
|
-
<char num='8719' name='prod' convertTo='$\\prod$' />
|
167
|
-
<char num='8722' name='minus' convertTo='$-$' />
|
168
|
-
<char num='8727' name='lowast' convertTo='$\\ast$' />
|
169
|
-
<char num='8730' name='radic' convertTo='$\\surd$' />
|
170
|
-
<char num='8733' name='prop' convertTo='$\\propto$' />
|
171
|
-
<char num='8734' name='infin' convertTo='$\\infty$' />
|
172
|
-
<char num='8736' name='ang' convertTo='$\\angle$' />
|
173
|
-
<char num='8743' name='and' convertTo='$\\wedge$' />
|
174
|
-
|
175
|
-
<char num='8744' name='or' convertTo='$\\vee$' />
|
176
|
-
<char num='8745' name='cup' convertTo='$\\cup$' />
|
177
|
-
<char num='8746' name='cap' convertTo='$\\cap$' />
|
178
|
-
<char num='8747' name='int' convertTo='$\\int$' />
|
179
|
-
<char num='8756' name='there4' convertTo='$\\therefore$' /> <!-- only AMS -->
|
180
|
-
<char num='8764' name='sim' convertTo='$\\sim$' />
|
181
|
-
<char num='8776' name='asymp' convertTo='$\\approx$' />
|
182
|
-
<char num='8773' name='cong' convertTo='$\\cong$' />
|
183
|
-
|
184
|
-
<char num='8800' name='ne' convertTo='$\\neq$' />
|
185
|
-
<char num='8801' name='equiv' convertTo='$\\equiv$' />
|
186
|
-
<char num='8804' name='le' convertTo='$\\leq$' />
|
187
|
-
<char num='8805' name='ge' convertTo='$\\geq$' />
|
188
|
-
<char num='8834' name='sub' convertTo='$\\subset$' />
|
189
|
-
<char num='8835' name='sup' convertTo='$\\supset$' />
|
190
|
-
<char num='8838' name='sube' convertTo='$\\subseteq$' />
|
191
|
-
<char num='8839' name='supe' convertTo='$\\supseteq$' />
|
192
|
-
<char num='8836' name='nsub' convertTo='$\\nsubset$' /> <!-- only AMS -->
|
193
|
-
|
194
|
-
<char num='8853' name='oplus' convertTo='$\\oplus$' />
|
195
|
-
<char num='8855' name='otimes' convertTo='$\\otimes$' />
|
196
|
-
<char num='8869' name='perp' convertTo='$\\perp$' />
|
197
|
-
<char num='8901' name='sdot' convertTo='$\\cdot$' />
|
198
|
-
<char num='8968' name='rceil' convertTo='$\\rceil$' />
|
199
|
-
<char num='8969' name='lceil' convertTo='$\\lceil$' />
|
200
|
-
<char num='8970' name='lfloor' convertTo='$\\lfloor$' />
|
201
|
-
<char num='8971' name='rfloor' convertTo='$\\rfloor$' />
|
202
|
-
<char num='9001' name='rang' convertTo='$\\rangle$' />
|
203
|
-
|
204
|
-
<char num='9002' name='lang' convertTo='$\\langle$' />
|
205
|
-
<char num='9674' name='loz' convertTo='$\\lozenge$' /> <!-- only AMS -->
|
206
|
-
<char num='9824' name='spades' convertTo='$\\spadesuit$' />
|
207
|
-
<char num='9827' name='clubs' convertTo='$\\clubsuit$' />
|
208
|
-
<char num='9829' name='hearts' convertTo='$\\heartsuit$' />
|
209
|
-
<char num='9830' name='diams' convertTo='$\\diamondsuit$' />
|
210
|
-
<char num='38' name='amp' convertTo='\\@AMP' />
|
211
|
-
<char num='34' name='quot' convertTo='@DOUBLEQUOT' />
|
212
|
-
<char num='169' name='copy' convertTo='\\copyright' />
|
213
|
-
|
214
|
-
<char num='60' name='lt' convertTo='$@LT$' />
|
215
|
-
<char num='62' name='gt' convertTo='$@GT$' />
|
216
|
-
<char num='338' name='OElig' convertTo='\\OE' />
|
217
|
-
<char num='339' name='oelig' convertTo='\\oe' />
|
218
|
-
<char num='352' name='Scaron' convertTo='\\v{S}' />
|
219
|
-
<char num='353' name='scaron' convertTo='\\v{s}' />
|
220
|
-
<char num='376' name='Yuml' convertTo='\\"Y' />
|
221
|
-
<char num='710' name='circ' convertTo='\\textasciicircum' />
|
222
|
-
<char num='732' name='tilde' convertTo='\\textasciitilde' />
|
223
|
-
|
224
|
-
<char num='8211' name='ndash' convertTo='--' />
|
225
|
-
<char num='8212' name='mdash' convertTo='---' />
|
226
|
-
<char num='8216' name='lsquo' convertTo='`' />
|
227
|
-
<char num='8217' name='rsquo' convertTo='@QUOT' />
|
228
|
-
<char num='8220' name='ldquo' convertTo='``' />
|
229
|
-
<char num='8221' name='rdquo' convertTo='@QUOT@QUOT' />
|
230
|
-
<char num='8224' name='dagger' convertTo='\\dag' />
|
231
|
-
<char num='8225' name='Dagger' convertTo='\\ddag' />
|
232
|
-
<char num='8240' name='permil' convertTo='\\permil' /> <!-- wasysym package -->
|
233
|
-
|
234
|
-
<char num='8364' name='euro' convertTo='\\euro' /> <!-- eurosym package -->
|
235
|
-
<char num='8249' name='lsaquo' convertTo='\\guilsinglleft' />
|
236
|
-
<char num='8250' name='rsaquo' convertTo='\\guilsinglright' />
|
237
|
-
<!-- <char num='160' name='nbsp' convertTo='\\nolinebreak' />-->
|
238
|
-
<char num='160' name='nbsp' convertTo='~' />
|
239
|
-
<char num='161' name='iexcl' convertTo='\\textexclamdown' />
|
240
|
-
<char num='163' name='pound' convertTo='\\pounds' />
|
241
|
-
<char num='164' name='curren' convertTo='\\currency' /> <!-- wasysym package -->
|
242
|
-
<char num='165' name='yen' convertTo='\\textyen' /> <!-- textcomp -->
|
243
|
-
|
244
|
-
<char num='166' name='brvbar' convertTo='\\brokenvert' /> <!-- wasysym -->
|
245
|
-
<char num='167' name='sect' convertTo='\\S' />
|
246
|
-
<char num='171' name='laquo' convertTo='\\guillemotleft' />
|
247
|
-
<char num='187' name='raquo' convertTo='\\guillemotright' />
|
248
|
-
<char num='174' name='reg' convertTo='\\textregistered' />
|
249
|
-
<char num='170' name='ordf' convertTo='\\textordfeminine' />
|
250
|
-
<char num='172' name='not' convertTo='$\\neg$' />
|
251
|
-
<char num='176' name='deg' convertTo='$\\degree$' /> <!-- mathabx -->
|
252
|
-
|
253
|
-
<char num='177' name='plusmn' convertTo='$\\pm$' />
|
254
|
-
<char num='180' name='acute' convertTo='@QUOT' />
|
255
|
-
<char num='181' name='micro' convertTo='$\\mu$' />
|
256
|
-
<char num='182' name='para' convertTo='\\P' />
|
257
|
-
<char num='183' name='middot' convertTo='$\\cdot$' />
|
258
|
-
<char num='186' name='ordm' convertTo='\\textordmasculine' />
|
259
|
-
<char num='162' name='cent' convertTo='\\cent' /> <!-- wasysym -->
|
260
|
-
<char num='185' name='sup1' convertTo='$^1$' />
|
261
|
-
|
262
|
-
<char num='178' name='sup2' convertTo='$^2$' />
|
263
|
-
<char num='179' name='sup3' convertTo='$^3$' />
|
264
|
-
<char num='189' name='frac12' convertTo='$\\frac{1}{2}$' />
|
265
|
-
<char num='188' name='frac14' convertTo='$\\frac{1}{4}$' />
|
266
|
-
<char num='190' name='frac34' convertTo='$\\frac{3}{4}' />
|
267
|
-
<char num='192' name='Agrave' convertTo='\\`A' />
|
268
|
-
<char num='193' name='Aacute' convertTo='\\@QUOTA' />
|
269
|
-
<char num='194' name='Acirc' convertTo='\\^A' />
|
270
|
-
<char num='195' name='Atilde' convertTo='\\~A' />
|
271
|
-
|
272
|
-
<char num='196' name='Auml' convertTo='\\@DOUBLEQUOTA' />
|
273
|
-
<char num='197' name='Aring' convertTo='\\AA' />
|
274
|
-
<char num='198' name='AElig' convertTo='\\AE' />
|
275
|
-
<char num='199' name='Ccedil' convertTo='\\cC' />
|
276
|
-
<char num='200' name='Egrave' convertTo='\\`E' />
|
277
|
-
<char num='201' name='Eacute' convertTo='\\@QUOTE' />
|
278
|
-
<char num='202' name='Ecirc' convertTo='\\^E' />
|
279
|
-
<char num='203' name='Euml' convertTo='\\@DOUBLEQUOTE' />
|
280
|
-
<char num='204' name='Igrave' convertTo='\\`I' />
|
281
|
-
|
282
|
-
<char num='205' name='Iacute' convertTo='\\@QUOTI' />
|
283
|
-
<char num='206' name='Icirc' convertTo='\\^I' />
|
284
|
-
<char num='207' name='Iuml' convertTo='\\"I' />
|
285
|
-
<char num='208' name='ETH' convertTo='$\\eth$' /> <!-- AMS -->
|
286
|
-
<char num='209' name='Ntilde' convertTo='\\~N' />
|
287
|
-
<char num='210' name='Ograve' convertTo='\\`O' />
|
288
|
-
<char num='211' name='Oacute' convertTo='\\@QUOTO' />
|
289
|
-
<char num='212' name='Ocirc' convertTo='\\^O' />
|
290
|
-
<char num='213' name='Otilde' convertTo='\\~O' />
|
291
|
-
|
292
|
-
<char num='214' name='Ouml' convertTo='\\@DOUBLEQUOTO' />
|
293
|
-
<char num='215' name='times' convertTo='$\\times$' />
|
294
|
-
<char num='216' name='Oslash' convertTo='\\O' />
|
295
|
-
<char num='217' name='Ugrave' convertTo='\\`U' />
|
296
|
-
<char num='218' name='Uacute' convertTo='\\@QUOTU' />
|
297
|
-
<char num='219' name='Ucirc' convertTo='\\^U' />
|
298
|
-
<char num='220' name='Uuml' convertTo='\\@DOUBLEQUOTU' />
|
299
|
-
<char num='221' name='Yacute' convertTo='\\@QUOTY' />
|
300
|
-
<char num='222' name='THORN' convertTo='\\Thorn' /> <!-- wasysym -->
|
301
|
-
|
302
|
-
<char num='223' name='szlig' convertTo='\\ss' />
|
303
|
-
<char num='224' name='agrave' convertTo='\\`a' />
|
304
|
-
<char num='225' name='aacute' convertTo='\\@QUOTa' />
|
305
|
-
<char num='226' name='acirc' convertTo='\\^a' />
|
306
|
-
<char num='227' name='atilde' convertTo='\\~a' />
|
307
|
-
<char num='228' name='auml' convertTo='\\@DOUBLEQUOTa' />
|
308
|
-
<char num='229' name='aring' convertTo='\\aa' />
|
309
|
-
<char num='230' name='aelig' convertTo='\\ae' />
|
310
|
-
<char num='231' name='ccedil' convertTo='\\cc' />
|
311
|
-
|
312
|
-
<char num='232' name='egrave' convertTo='\\`e' />
|
313
|
-
<char num='233' name='eacute' convertTo='\\@QUOTe' />
|
314
|
-
<char num='234' name='ecirc' convertTo='\\^e' />
|
315
|
-
<char num='235' name='euml' convertTo='\\@DOUBLEQUOTe' />
|
316
|
-
<char num='236' name='igrave' convertTo='\\`i' />
|
317
|
-
<char num='237' name='iacute' convertTo='\\@QUOTi' />
|
318
|
-
<char num='238' name='icirc' convertTo='\\^i' />
|
319
|
-
<char num='239' name='iuml' convertTo='\\@DOUBLEQUOTi' />
|
320
|
-
<char num='240' name='eth' convertTo='$\\eth$' /> <!-- -->
|
321
|
-
|
322
|
-
<char num='241' name='ntilde' convertTo='\\~n' />
|
323
|
-
<char num='242' name='ograve' convertTo='\\`o' />
|
324
|
-
<char num='243' name='oacute' convertTo='\\@QUOTo' />
|
325
|
-
<char num='244' name='ocirc' convertTo='\\^o' />
|
326
|
-
<char num='245' name='otilde' convertTo='\\~o' />
|
327
|
-
<char num='246' name='ouml' convertTo='\\@DOUBLEQUOTo' />
|
328
|
-
<char num='247' name='divide' convertTo='$\\divide$' />
|
329
|
-
<char num='248' name='oslash' convertTo='\\o' />
|
330
|
-
<char num='249' name='ugrave' convertTo='\\`u' />
|
331
|
-
<char num='250' name='uacute' convertTo='\\@QUOTu' />
|
332
|
-
|
333
|
-
<char num='251' name='ucirc' convertTo='\\^u' />
|
334
|
-
<char num='252' name='uuml' convertTo='\\@DOUBLEQUOTu' />
|
335
|
-
<char num='253' name='yacute' convertTo='\\@QUOTy' />
|
336
|
-
<char num='254' name='thorn' convertTo='\\thorn' /> <!-- wasysym -->
|
337
|
-
<char num='255' name='yuml' convertTo='\\@DOUBLEQUOTy' />
|
338
|
-
</chars>
|
339
|
-
EOF
|
57
|
+
|
340
58
|
|
341
59
|
end
|
data/lib/maruku/version.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -12,7 +12,7 @@ Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
12
12
|
|
13
13
|
Ancora
|
14
14
|
|
15
|
-
1.
|
15
|
+
1. This is a list item with two paragraphs. Lorem ipsum dolor
|
16
16
|
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
|
17
17
|
mi posuere lectus.
|
18
18
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: maruku
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
6
|
+
version: 0.2.11
|
7
7
|
date: 2006-12-28 00:00:00 +01:00
|
8
8
|
summary: A Markdown interpreter in Ruby
|
9
9
|
require_paths:
|
@@ -31,11 +31,13 @@ authors:
|
|
31
31
|
files:
|
32
32
|
- lib/maruku.rb
|
33
33
|
- lib/maruku/parse_block.rb
|
34
|
+
- lib/maruku/parse_doc.rb
|
34
35
|
- lib/maruku/parse_span.rb
|
35
36
|
- lib/maruku/string_utils.rb
|
36
37
|
- lib/maruku/structures.rb
|
37
38
|
- lib/maruku/to_html.rb
|
38
39
|
- lib/maruku/to_latex.rb
|
40
|
+
- lib/maruku/to_latex_entities.rb
|
39
41
|
- lib/maruku/to_latex_strings.rb
|
40
42
|
- lib/maruku/to_s.rb
|
41
43
|
- lib/maruku/toc.rb
|
@@ -43,34 +45,34 @@ files:
|
|
43
45
|
- docs/markdown_syntax.md
|
44
46
|
- docs/maruku.md
|
45
47
|
- docs/todo.md
|
46
|
-
- tests/abbreviations.md
|
47
|
-
- tests/blank.md
|
48
|
-
- tests/code.md
|
49
|
-
- tests/code2.md
|
50
|
-
- tests/code3.md
|
51
|
-
- tests/email.md
|
52
|
-
- tests/entities.md
|
53
|
-
- tests/escaping.md
|
54
|
-
- tests/extra_dl.md
|
55
|
-
- tests/extra_header_id.md
|
56
|
-
- tests/extra_table1.md
|
57
|
-
- tests/footnotes.md
|
58
|
-
- tests/headers.md
|
59
|
-
- tests/hrule.md
|
60
|
-
- tests/images.md
|
61
|
-
- tests/inline_html.md
|
62
|
-
- tests/links.md
|
63
|
-
- tests/list1.md
|
64
|
-
- tests/list2.md
|
65
|
-
- tests/list3.md
|
66
|
-
- tests/lists.md
|
67
|
-
- tests/lists_ol.md
|
68
|
-
- tests/misc_sw.md
|
69
|
-
- tests/one.md
|
70
|
-
- tests/paragraphs.md
|
71
|
-
- tests/sss06.md
|
72
|
-
- tests/test.md
|
73
48
|
- tests/bugs/code_in_links.md
|
49
|
+
- tests/others/abbreviations.md
|
50
|
+
- tests/others/blank.md
|
51
|
+
- tests/others/code.md
|
52
|
+
- tests/others/code2.md
|
53
|
+
- tests/others/code3.md
|
54
|
+
- tests/others/email.md
|
55
|
+
- tests/others/entities.md
|
56
|
+
- tests/others/escaping.md
|
57
|
+
- tests/others/extra_dl.md
|
58
|
+
- tests/others/extra_header_id.md
|
59
|
+
- tests/others/extra_table1.md
|
60
|
+
- tests/others/footnotes.md
|
61
|
+
- tests/others/headers.md
|
62
|
+
- tests/others/hrule.md
|
63
|
+
- tests/others/images.md
|
64
|
+
- tests/others/inline_html.md
|
65
|
+
- tests/others/links.md
|
66
|
+
- tests/others/list1.md
|
67
|
+
- tests/others/list2.md
|
68
|
+
- tests/others/list3.md
|
69
|
+
- tests/others/lists.md
|
70
|
+
- tests/others/lists_ol.md
|
71
|
+
- tests/others/misc_sw.md
|
72
|
+
- tests/others/one.md
|
73
|
+
- tests/others/paragraphs.md
|
74
|
+
- tests/others/sss06.md
|
75
|
+
- tests/others/test.md
|
74
76
|
- bin/maruku
|
75
77
|
- bin/marutex
|
76
78
|
test_files: []
|