git.iko.soy/typeable/pandoc
on master help sign in
HTML writer: Spacing adjustments for Plain and RawHtml blocks.
commitce4f9a378703ad8043bec19722399b5d4b78f162 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 4 Feb 2011, 21:05 (16 years ago) parent90647a5
7 files changed+196−402
src/Text/Pandoc/Writers/HTML.hs+2 tests/s5.basic.html+3−9 tests/s5.fancy.html+3−9 tests/s5.fragment.html+3−6 tests/s5.inserts.html+3−6 tests/tables.html+108−200 tests/writer.html+74−172
src/Text/Pandoc/Writers/HTML.hs+2
@@ -317,6 +317,8 @@ attrsToHtml opts (id',classes',keyvals) =
317317
318318-- | Convert Pandoc block element to HTML.
319319blockToHtml :: WriterOptions -> Block -> State WriterState Html
320+blockToHtml opts b@(Plain _) = blockToHtml' opts b
321+blockToHtml opts b@(RawBlock _ _) = blockToHtml' opts b
320322blockToHtml opts b = blockToHtml' opts b >>= return . (nl opts +++)
321323
322324blockToHtml' :: WriterOptions -> Block -> State WriterState Html
tests/s5.basic.html+3−9
@@ -40,25 +40,19 @@
4040<h1>First slide</h1>
4141
4242<ul>
43−<li>
44−first bullet</li>
45−<li>
46−second bullet</li>
43+<li>first bullet</li>
44+<li>second bullet</li>
4745</ul>
48−
4946</div>
5047
51−
5248<div class="slide">
5349
5450
5551<h1>Math</h1>
5652
5753<ul>
58−<li>
59−<span class="math">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
54+<li><span class="math">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
6055</ul>
61−
6256</div>
6357</div>
6458</body>
tests/s5.fancy.html+3−9
@@ -239,25 +239,19 @@
239239<h1>First slide</h1>
240240
241241<ul class="incremental">
242−<li>
243−first bullet</li>
244−<li>
245−second bullet</li>
242+<li>first bullet</li>
243+<li>second bullet</li>
246244</ul>
247−
248245</div>
249246
250−
251247<div class="slide">
252248
253249
254250<h1>Math</h1>
255251
256252<ul class="incremental">
257−<li>
258−<span class="LaTeX">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
253+<li><span class="LaTeX">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
259254</ul>
260−
261255</div>
262256</div>
263257</body>
tests/s5.fragment.html+3−6
@@ -1,15 +1,12 @@
11<h1 id="first-slide">First slide</h1>
22
33<ul>
4−<li>
5−first bullet</li>
6−<li>
7−second bullet</li>
4+<li>first bullet</li>
5+<li>second bullet</li>
86</ul>
97
108<h1 id="math">Math</h1>
119
1210<ul>
13−<li>
14−<span class="math">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
11+<li><span class="math">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
1512</ul>
tests/s5.inserts.html+3−6
@@ -16,17 +16,14 @@ STUFF INSERTED
1616<h1 id="first-slide">First slide</h1>
1717
1818<ul>
19−<li>
20−first bullet</li>
21−<li>
22−second bullet</li>
19+<li>first bullet</li>
20+<li>second bullet</li>
2321</ul>
2422
2523<h1 id="math">Math</h1>
2624
2725<ul>
28−<li>
29−<span class="math">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
26+<li><span class="math">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
3027</ul>
3128STUFF INSERTED
3229</body>
tests/tables.html+108−200
@@ -1,234 +1,142 @@
11<p>Simple table with caption:</p>
22
3−<table><caption>Demonstration of simple table syntax.</caption><thead><tr class="header"><th align="right">
4−Right</th>
5−<th align="left">
6−Left</th>
7−<th align="center">
8−Center</th>
9−<th align="left">
10−Default</th>
11−</tr>
12−</thead><tbody><tr class="odd"><td align="right">
13−12</td>
14−<td align="left">
15−12</td>
16−<td align="center">
17−12</td>
18−<td align="left">
19−12</td>
20−</tr>
21−<tr class="even"><td align="right">
22−123</td>
23−<td align="left">
24−123</td>
25−<td align="center">
26−123</td>
27−<td align="left">
28−123</td>
29−</tr>
30−<tr class="odd"><td align="right">
31−1</td>
32−<td align="left">
33−1</td>
34−<td align="center">
35−1</td>
36−<td align="left">
37−1</td>
3+<table><caption>Demonstration of simple table syntax.</caption><thead><tr class="header"><th align="right">Right</th>
4+<th align="left">Left</th>
5+<th align="center">Center</th>
6+<th align="left">Default</th>
7+</tr>
8+</thead><tbody><tr class="odd"><td align="right">12</td>
9+<td align="left">12</td>
10+<td align="center">12</td>
11+<td align="left">12</td>
12+</tr>
13+<tr class="even"><td align="right">123</td>
14+<td align="left">123</td>
15+<td align="center">123</td>
16+<td align="left">123</td>
17+</tr>
18+<tr class="odd"><td align="right">1</td>
19+<td align="left">1</td>
20+<td align="center">1</td>
21+<td align="left">1</td>
3822</tr>
3923</tbody></table>
4024
4125<p>Simple table without caption:</p>
4226
43−<table><thead><tr class="header"><th align="right">
44−Right</th>
45−<th align="left">
46−Left</th>
47−<th align="center">
48−Center</th>
49−<th align="left">
50−Default</th>
51−</tr>
52−</thead><tbody><tr class="odd"><td align="right">
53−12</td>
54−<td align="left">
55−12</td>
56−<td align="center">
57−12</td>
58−<td align="left">
59−12</td>
60−</tr>
61−<tr class="even"><td align="right">
62−123</td>
63−<td align="left">
64−123</td>
65−<td align="center">
66−123</td>
67−<td align="left">
68−123</td>
69−</tr>
70−<tr class="odd"><td align="right">
71−1</td>
72−<td align="left">
73−1</td>
74−<td align="center">
75−1</td>
76−<td align="left">
77−1</td>
27+<table><thead><tr class="header"><th align="right">Right</th>
28+<th align="left">Left</th>
29+<th align="center">Center</th>
30+<th align="left">Default</th>
31+</tr>
32+</thead><tbody><tr class="odd"><td align="right">12</td>
33+<td align="left">12</td>
34+<td align="center">12</td>
35+<td align="left">12</td>
36+</tr>
37+<tr class="even"><td align="right">123</td>
38+<td align="left">123</td>
39+<td align="center">123</td>
40+<td align="left">123</td>
41+</tr>
42+<tr class="odd"><td align="right">1</td>
43+<td align="left">1</td>
44+<td align="center">1</td>
45+<td align="left">1</td>
7846</tr>
7947</tbody></table>
8048
8149<p>Simple table indented two spaces:</p>
8250
83−<table><caption>Demonstration of simple table syntax.</caption><thead><tr class="header"><th align="right">
84−Right</th>
85−<th align="left">
86−Left</th>
87−<th align="center">
88−Center</th>
89−<th align="left">
90−Default</th>
91−</tr>
92−</thead><tbody><tr class="odd"><td align="right">
93−12</td>
94−<td align="left">
95−12</td>
96−<td align="center">
97−12</td>
98−<td align="left">
99−12</td>
100−</tr>
101−<tr class="even"><td align="right">
102−123</td>
103−<td align="left">
104−123</td>
105−<td align="center">
106−123</td>
107−<td align="left">
108−123</td>
109−</tr>
110−<tr class="odd"><td align="right">
111−1</td>
112−<td align="left">
113−1</td>
114−<td align="center">
115−1</td>
116−<td align="left">
117−1</td>
51+<table><caption>Demonstration of simple table syntax.</caption><thead><tr class="header"><th align="right">Right</th>
52+<th align="left">Left</th>
53+<th align="center">Center</th>
54+<th align="left">Default</th>
55+</tr>
56+</thead><tbody><tr class="odd"><td align="right">12</td>
57+<td align="left">12</td>
58+<td align="center">12</td>
59+<td align="left">12</td>
60+</tr>
61+<tr class="even"><td align="right">123</td>
62+<td align="left">123</td>
63+<td align="center">123</td>
64+<td align="left">123</td>
65+</tr>
66+<tr class="odd"><td align="right">1</td>
67+<td align="left">1</td>
68+<td align="center">1</td>
69+<td align="left">1</td>
11870</tr>
11971</tbody></table>
12072
12173<p>Multiline table with caption:</p>
12274
123−<table><caption>Here's the caption. It may span multiple lines.</caption><col width="15%" /><col width="13%" /><col width="16%" /><col width="33%" /><thead><tr class="header"><th align="center">
124−Centered Header</th>
125−<th align="left">
126−Left Aligned</th>
127−<th align="right">
128−Right Aligned</th>
129−<th align="left">
130−Default aligned</th>
131−</tr>
132−</thead><tbody><tr class="odd"><td align="center">
133−First</td>
134−<td align="left">
135−row</td>
136−<td align="right">
137−12.0</td>
138−<td align="left">
139−Example of a row that spans multiple lines.</td>
140−</tr>
141−<tr class="even"><td align="center">
142−Second</td>
143−<td align="left">
144−row</td>
145−<td align="right">
146−5.0</td>
147−<td align="left">
148−Here's another one. Note the blank line between rows.</td>
75+<table><caption>Here's the caption. It may span multiple lines.</caption><col width="15%" /><col width="13%" /><col width="16%" /><col width="33%" /><thead><tr class="header"><th align="center">Centered Header</th>
76+<th align="left">Left Aligned</th>
77+<th align="right">Right Aligned</th>
78+<th align="left">Default aligned</th>
79+</tr>
80+</thead><tbody><tr class="odd"><td align="center">First</td>
81+<td align="left">row</td>
82+<td align="right">12.0</td>
83+<td align="left">Example of a row that spans multiple lines.</td>
84+</tr>
85+<tr class="even"><td align="center">Second</td>
86+<td align="left">row</td>
87+<td align="right">5.0</td>
88+<td align="left">Here's another one. Note the blank line between rows.</td>
14989</tr>
15090</tbody></table>
15191
15292<p>Multiline table without caption:</p>
15393
154−<table><col width="15%" /><col width="13%" /><col width="16%" /><col width="33%" /><thead><tr class="header"><th align="center">
155−Centered Header</th>
156−<th align="left">
157−Left Aligned</th>
158−<th align="right">
159−Right Aligned</th>
160−<th align="left">
161−Default aligned</th>
162−</tr>
163−</thead><tbody><tr class="odd"><td align="center">
164−First</td>
165−<td align="left">
166−row</td>
167−<td align="right">
168−12.0</td>
169−<td align="left">
170−Example of a row that spans multiple lines.</td>
171−</tr>
172−<tr class="even"><td align="center">
173−Second</td>
174−<td align="left">
175−row</td>
176−<td align="right">
177−5.0</td>
178−<td align="left">
179−Here's another one. Note the blank line between rows.</td>
94+<table><col width="15%" /><col width="13%" /><col width="16%" /><col width="33%" /><thead><tr class="header"><th align="center">Centered Header</th>
95+<th align="left">Left Aligned</th>
96+<th align="right">Right Aligned</th>
97+<th align="left">Default aligned</th>
98+</tr>
99+</thead><tbody><tr class="odd"><td align="center">First</td>
100+<td align="left">row</td>
101+<td align="right">12.0</td>
102+<td align="left">Example of a row that spans multiple lines.</td>
103+</tr>
104+<tr class="even"><td align="center">Second</td>
105+<td align="left">row</td>
106+<td align="right">5.0</td>
107+<td align="left">Here's another one. Note the blank line between rows.</td>
180108</tr>
181109</tbody></table>
182110
183111<p>Table without column headers:</p>
184112
185−<table><tbody><tr class="odd"><td align="right">
186−12</td>
187−<td align="left">
188−12</td>
189−<td align="center">
190−12</td>
191−<td align="right">
192−12</td>
193−</tr>
194−<tr class="even"><td align="right">
195−123</td>
196−<td align="left">
197−123</td>
198−<td align="center">
199−123</td>
200−<td align="right">
201−123</td>
202−</tr>
203−<tr class="odd"><td align="right">
204−1</td>
205−<td align="left">
206−1</td>
207−<td align="center">
208−1</td>
209−<td align="right">
210−1</td>
113+<table><tbody><tr class="odd"><td align="right">12</td>
114+<td align="left">12</td>
115+<td align="center">12</td>
116+<td align="right">12</td>
117+</tr>
118+<tr class="even"><td align="right">123</td>
119+<td align="left">123</td>
120+<td align="center">123</td>
121+<td align="right">123</td>
122+</tr>
123+<tr class="odd"><td align="right">1</td>
124+<td align="left">1</td>
125+<td align="center">1</td>
126+<td align="right">1</td>
211127</tr>
212128</tbody></table>
213129
214130<p>Multiline table without column headers:</p>
215131
216−<table><col width="15%" /><col width="13%" /><col width="16%" /><col width="33%" /><tbody><tr class="odd"><td align="center">
217−First</td>
218−<td align="left">
219−row</td>
220−<td align="right">
221−12.0</td>
222−<td align="left">
223−Example of a row that spans multiple lines.</td>
224−</tr>
225−<tr class="even"><td align="center">
226−Second</td>
227−<td align="left">
228−row</td>
229−<td align="right">
230−5.0</td>
231−<td align="left">
232−Here's another one. Note the blank line between rows.</td>
132+<table><col width="15%" /><col width="13%" /><col width="16%" /><col width="33%" /><tbody><tr class="odd"><td align="center">First</td>
133+<td align="left">row</td>
134+<td align="right">12.0</td>
135+<td align="left">Example of a row that spans multiple lines.</td>
136+</tr>
137+<tr class="even"><td align="center">Second</td>
138+<td align="left">row</td>
139+<td align="right">5.0</td>
140+<td align="left">Here's another one. Note the blank line between rows.</td>
233141</tr>
234142</tbody></table>
tests/writer.html+74−172
@@ -68,10 +68,8 @@
6868<p>A list:</p>
6969
7070<ol style="list-style-type: decimal">
71−<li>
72−item one</li>
73−<li>
74−item two</li>
71+<li>item one</li>
72+<li>item two</li>
7573</ol>
7674
7775<p>Nested block quotes:</p>
@@ -117,12 +115,9 @@ These should not be escaped: \$ \\ \&gt; \[ \{
117115<p>Asterisks tight:</p>
118116
119117<ul>
120−<li>
121−asterisk 1</li>
122−<li>
123−asterisk 2</li>
124−<li>
125−asterisk 3</li>
118+<li>asterisk 1</li>
119+<li>asterisk 2</li>
120+<li>asterisk 3</li>
126121</ul>
127122
128123<p>Asterisks loose:</p>
@@ -139,12 +134,9 @@ asterisk 3</li>
139134<p>Pluses tight:</p>
140135
141136<ul>
142−<li>
143−Plus 1</li>
144−<li>
145−Plus 2</li>
146−<li>
147−Plus 3</li>
137+<li>Plus 1</li>
138+<li>Plus 2</li>
139+<li>Plus 3</li>
148140</ul>
149141
150142<p>Pluses loose:</p>
@@ -161,12 +153,9 @@ Plus 3</li>
161153<p>Minuses tight:</p>
162154
163155<ul>
164−<li>
165−Minus 1</li>
166−<li>
167−Minus 2</li>
168−<li>
169−Minus 3</li>
156+<li>Minus 1</li>
157+<li>Minus 2</li>
158+<li>Minus 3</li>
170159</ul>
171160
172161<p>Minuses loose:</p>
@@ -185,23 +174,17 @@ Minus 3</li>
185174<p>Tight:</p>
186175
187176<ol style="list-style-type: decimal">
188−<li>
189−First</li>
190−<li>
191−Second</li>
192−<li>
193−Third</li>
177+<li>First</li>
178+<li>Second</li>
179+<li>Third</li>
194180</ol>
195181
196182<p>and:</p>
197183
198184<ol style="list-style-type: decimal">
199−<li>
200−One</li>
201−<li>
202−Two</li>
203−<li>
204−Three</li>
185+<li>One</li>
186+<li>Two</li>
187+<li>Three</li>
205188</ol>
206189
207190<p>Loose using tabs:</p>
@@ -242,16 +225,13 @@ Three</li>
242225<h2 id="nested">Nested</h2>
243226
244227<ul>
245−<li>
246−Tab
228+<li>Tab
247229
248230<ul>
249−<li>
250−Tab
231+<li>Tab
251232
252233<ul>
253−<li>
254−Tab</li>
234+<li>Tab</li>
255235</ul></li>
256236</ul></li>
257237</ul>
@@ -259,21 +239,15 @@ Tab</li>
259239<p>Here’s another:</p>
260240
261241<ol style="list-style-type: decimal">
262−<li>
263−First</li>
264−<li>
265−Second:
242+<li>First</li>
243+<li>Second:
266244
267245<ul>
268−<li>
269−Fee</li>
270−<li>
271−Fie</li>
272−<li>
273−Foe</li>
246+<li>Fee</li>
247+<li>Fie</li>
248+<li>Foe</li>
274249</ul></li>
275−<li>
276−Third</li>
250+<li>Third</li>
277251</ol>
278252
279253<p>Same thing but with paragraphs:</p>
@@ -285,12 +259,9 @@ Third</li>
285259<p>Second:</p>
286260
287261<ul>
288−<li>
289−Fee</li>
290−<li>
291−Fie</li>
292−<li>
293−Foe</li>
262+<li>Fee</li>
263+<li>Fie</li>
264+<li>Foe</li>
294265</ul></li>
295266<li>
296267<p>Third</p></li>
@@ -315,24 +286,19 @@ Foe</li>
315286<h2 id="fancy-list-markers">Fancy list markers</h2>
316287
317288<ol start="2" style="list-style-type: decimal">
318−<li>
319−begins with 2</li>
289+<li>begins with 2</li>
320290<li>
321291<p>and now 3</p>
322292
323293<p>with a continuation</p>
324294
325295<ol start="4" style="list-style-type: lower-roman">
326−<li>
327−sublist with roman numerals, starting with 4</li>
328−<li>
329−more items
296+<li>sublist with roman numerals, starting with 4</li>
297+<li>more items
330298
331299<ol style="list-style-type: upper-alpha">
332−<li>
333−a subsublist</li>
334−<li>
335−a subsublist</li>
300+<li>a subsublist</li>
301+<li>a subsublist</li>
336302</ol></li>
337303</ol></li>
338304</ol>
@@ -340,20 +306,16 @@ a subsublist</li>
340306<p>Nesting:</p>
341307
342308<ol style="list-style-type: upper-alpha">
343−<li>
344−Upper Alpha
309+<li>Upper Alpha
345310
346311<ol style="list-style-type: upper-roman">
347−<li>
348−Upper Roman.
312+<li>Upper Roman.
349313
350314<ol start="6" style="list-style-type: decimal">
351−<li>
352−Decimal start with 6
315+<li>Decimal start with 6
353316
354317<ol start="3" style="list-style-type: lower-alpha">
355−<li>
356−Lower alpha with paren</li>
318+<li>Lower alpha with paren</li>
357319</ol></li>
358320</ol></li>
359321</ol></li>
@@ -362,14 +324,11 @@ Lower alpha with paren</li>
362324<p>Autonumbering:</p>
363325
364326<ol>
365−<li>
366−Autonumber.</li>
367−<li>
368−More.
327+<li>Autonumber.</li>
328+<li>More.
369329
370330<ol>
371−<li>
372−Nested.</li>
331+<li>Nested.</li>
373332</ol></li>
374333</ol>
375334
@@ -387,16 +346,13 @@ Nested.</li>
387346
388347<dl>
389348<dt>apple</dt>
390−<dd>
391−red fruit
349+<dd>red fruit
392350</dd>
393351<dt>orange</dt>
394−<dd>
395−orange fruit
352+<dd>orange fruit
396353</dd>
397354<dt>banana</dt>
398−<dd>
399−yellow fruit
355+<dd>yellow fruit
400356</dd>
401357</dl>
402358
@@ -404,16 +360,13 @@ yellow fruit
404360
405361<dl>
406362<dt>apple</dt>
407−<dd>
408−red fruit
363+<dd>red fruit
409364</dd>
410365<dt>orange</dt>
411−<dd>
412−orange fruit
366+<dd>orange fruit
413367</dd>
414368<dt>banana</dt>
415−<dd>
416−yellow fruit
369+<dd>yellow fruit
417370</dd>
418371</dl>
419372
@@ -459,16 +412,12 @@ yellow fruit
459412
460413<dl>
461414<dt>apple</dt>
462−<dd>
463−red fruit
464−</dd><dd>
465−computer
415+<dd>red fruit
416+</dd><dd>computer
466417</dd>
467418<dt>orange</dt>
468−<dd>
469−orange fruit
470−</dd><dd>
471−bank
419+<dd>orange fruit
420+</dd><dd>bank
472421</dd>
473422</dl>
474423
@@ -503,10 +452,8 @@ bank
503452<p>orange fruit</p>
504453
505454<ol style="list-style-type: decimal">
506−<li>
507−sublist</li>
508−<li>
509−sublist</li>
455+<li>sublist</li>
456+<li>sublist</li>
510457</ol>
511458</dd>
512459</dl>
@@ -514,45 +461,32 @@ sublist</li>
514461<h1 id="html-blocks">HTML Blocks</h1>
515462
516463<p>Simple block on one line:</p>
517−
518464<div>
519−
520465foo
521−
522466</div>
523467
524468
525469<p>And nested without indentation:</p>
526−
527470<div>
528471<div>
529472<div>
530−
531473foo
532−
533474</div>
534475</div>
535476<div>
536−
537477bar
538−
539478</div>
540479</div>
541480
542481
543482<p>Interpreted markdown in a table:</p>
544−
545483<table>
546484<tr>
547485<td>
548−
549486This is <em>emphasized</em>
550−
551487</td>
552488<td>
553−
554489And this is <strong>strong</strong>
555−
556490</td>
557491</tr>
558492</table>
@@ -561,12 +495,9 @@ And this is <strong>strong</strong>
561495
562496
563497<p>Here’s a simple block:</p>
564−
565498<div>
566499
567−
568500foo
569−
570501</div>
571502
572503
@@ -583,26 +514,21 @@ foo
583514</code></pre>
584515
585516<p>Now, nested:</p>
586−
587517<div>
588518 <div>
589519 <div>
590520
591−
592521foo
593−
594522</div>
595523 </div>
596524</div>
597525
598526
599527<p>This should just be an HTML comment:</p>
600−
601528<!-- Comment -->
602529
603530
604531<p>Multiline:</p>
605−
606532<!--
607533Blah
608534Blah
@@ -619,7 +545,6 @@ Blah
619545</code></pre>
620546
621547<p>Just plain comment, with trailing spaces on the line:</p>
622−
623548<!-- foo -->
624549
625550
@@ -629,7 +554,6 @@ Blah
629554</code></pre>
630555
631556<p>Hr’s:</p>
632−
633557<hr>
634558
635559<hr />
@@ -702,41 +626,28 @@ Blah
702626<h1 id="latex">LaTeX</h1>
703627
704628<ul>
705−<li>
706−</li>
707−<li>
708−<span class="math">2 + 2 = 4</span></li>
709−<li>
710−<span class="math"><em>x</em> ∈ <em>y</em></span></li>
711−<li>
712−<span class="math">α ∧ ω</span></li>
713−<li>
714−<span class="math">223</span></li>
715−<li>
716−<span class="math"><em>p</em></span>-Tree</li>
717−<li>
718−Here’s some display math: <br /><span class="math">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span><br /></li>
719−<li>
720−Here’s one that has a line break in it: <span class="math">α + ω × <em>x</em><sup>2</sup></span>.</li>
629+<li></li>
630+<li><span class="math">2 + 2 = 4</span></li>
631+<li><span class="math"><em>x</em> ∈ <em>y</em></span></li>
632+<li><span class="math">α ∧ ω</span></li>
633+<li><span class="math">223</span></li>
634+<li><span class="math"><em>p</em></span>-Tree</li>
635+<li>Here’s some display math: <br /><span class="math">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span><br /></li>
636+<li>Here’s one that has a line break in it: <span class="math">α + ω × <em>x</em><sup>2</sup></span>.</li>
721637</ul>
722638
723639<p>These shouldn’t be math:</p>
724640
725641<ul>
726−<li>
727−To get the famous equation, write <code>$e = mc^2$</code>.</li>
728−<li>
729−$22,000 is a <em>lot</em> of money. So is $34,000. (It worked if “lot” is emphasized.)</li>
730−<li>
731−Shoes ($20) and socks ($5).</li>
732−<li>
733−Escaped <code>$</code>: $73 <em>this should be emphasized</em> 23$.</li>
642+<li>To get the famous equation, write <code>$e = mc^2$</code>.</li>
643+<li>$22,000 is a <em>lot</em> of money. So is $34,000. (It worked if “lot” is emphasized.)</li>
644+<li>Shoes ($20) and socks ($5).</li>
645+<li>Escaped <code>$</code>: $73 <em>this should be emphasized</em> 23$.</li>
734646</ul>
735647
736648<p>Here’s a LaTeX table:</p>
737649
738650
739−
740651<hr />
741652
742653<h1 id="special-characters">Special Characters</h1>
@@ -744,16 +655,11 @@ Escaped <code>$</code>: $73 <em>this should be emphasized</em> 23$.</li>
744655<p>Here is some unicode:</p>
745656
746657<ul>
747−<li>
748−I hat: Î</li>
749−<li>
750−o umlaut: ö</li>
751−<li>
752−section: §</li>
753−<li>
754−set membership: ∈</li>
755−<li>
756−copyright: ©</li>
658+<li>I hat: Î</li>
659+<li>o umlaut: ö</li>
660+<li>section: §</li>
661+<li>set membership: ∈</li>
662+<li>copyright: ©</li>
757663</ul>
758664
759665<p>AT&amp;T has an ampersand in their name.</p>
@@ -869,12 +775,9 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'Email link'+'<\/'+'a'+'>')
869775<p>With an ampersand: <a href="http://example.com/?foo=1&amp;bar=2"><code class="url">http://example.com/?foo=1&amp;bar=2</code></a></p>
870776
871777<ul>
872−<li>
873−In a list?</li>
874−<li>
875−<a href="http://example.com/"><code class="url">http://example.com/</code></a></li>
876−<li>
877−It should.</li>
778+<li>In a list?</li>
779+<li><a href="http://example.com/"><code class="url">http://example.com/</code></a></li>
780+<li>It should.</li>
878781</ul>
879782
880783<p>An e-mail address: <script type="text/javascript">
@@ -914,8 +817,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
914817<p>Notes can go in quotes.<sup><a href="#fn4" class="footnoteRef" id="fnref4">4</a></sup></p></blockquote>
915818
916819<ol style="list-style-type: decimal">
917−<li>
918−And in list items.<sup><a href="#fn5" class="footnoteRef" id="fnref5">5</a></sup></li>
820+<li>And in list items.<sup><a href="#fn5" class="footnoteRef" id="fnref5">5</a></sup></li>
919821</ol>
920822
921823<p>This paragraph should not be part of the note, as it is not indented.</p><div class="footnotes">