git.iko.soy/typeable/pandoc
on master help sign in
Merge branch 'master' into tests
commit5da2d1e66ca0dec86b31407f6e6e9d129e5b23b5 authorJohn MacFarlane <jgm@berkeley.edu> dateWed 12 Jan 2011, 08:13 (16 years ago) parentff74c5191510a1
13 files changed+130−55
README+12−4 Setup.hs+3−3 src/Text/Pandoc.hs+12−6 src/Text/Pandoc/Shared.hs+2 src/Text/Pandoc/Writers/HTML.hs+40−14 src/pandoc.hs+12−2 templates/html.template+26−3 templates/s5.template+1−1 templates/slidy.template+1−1 tests/s5.basic.html+1−1 tests/s5.fancy.html+1−1 tests/s5.inserts.html+1−1 tests/writer.html+18−18
README+12−4
@@ -208,6 +208,10 @@ Options
208208 `markdown` or `textile`. It is selected automatically when the input
209209 format is `textile` or the output format is `latex` or `context`.)
210210
211+`-5`, `--html5`
212+: Produce HTML5 instead of HTML4. This option has no effect for writers
213+ other than `html`.
214+
211215`-m` *URL*, `--latexmathml=`*URL*
212216: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
213217 To insert a link to a local copy of the `LaTeXMathML.js` script,
@@ -262,8 +266,9 @@ Options
262266 By default, sections are not numbered.
263267
264268`--section-divs`
265−: Wrap sections in `<div>` tags, and attach identifiers to the
266− enclosing `<div>` rather than the header itself.
269+: Wrap sections in `<div>` tags (or `<section>` tags in HTML5),
270+ and attach identifiers to the enclosing `<div>` (or `<section>`)
271+ rather than the header itself.
267272 See [Section identifiers](#header-identifiers-in-html), below.
268273
269274`--no-wrap`
@@ -504,6 +509,8 @@ depending on the output format, but include:
504509 multiple values)
505510`date`
506511: date of document, as specified in title block
512+`lang`
513+: language code for HTML documents
507514
508515Variables may be set at the command line using the `-V/--variable`
509516option. This allows users to include custom variables in their
@@ -1143,8 +1150,9 @@ Note, however, that this method of providing links to sections works
11431150only in HTML.
11441151
11451152If the `--section-divs` option is specified, then each section will
1146−be wrapped in a `div`, and the identifier will be attached to the
1147−enclosing `<div>` tag rather than the header itself. This allows entire
1153+be wrapped in a `div` (or a `section`, if `--html5` was specified),
1154+and the identifier will be attached to the enclosing `<div>`
1155+(or `<section>`) tag rather than the header itself. This allows entire
11481156sections to be manipulated using javascript or treated differently in
11491157CSS.
11501158
Setup.hs+3−3
@@ -9,7 +9,7 @@ import Distribution.Verbosity ( Verbosity, silent )
99import Distribution.Simple.InstallDirs (mandir, bindir, CopyDest (NoCopyDest))
1010import Distribution.Simple.Utils (copyFiles)
1111import Control.Exception ( bracket_ )
12−import Control.Monad ( unless, when )
12+import Control.Monad ( unless )
1313import System.Process ( rawSystem, runCommand, runProcess, waitForProcess )
1414import System.FilePath ( (</>), (<.>) )
1515import System.Directory
@@ -50,8 +50,8 @@ runTestSuite args _ pkg lbi = do
5050
5151-- | Build man pages from markdown sources in man/man1/.
5252makeManPages :: Args -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO ()
53−makeManPages _ flags _ buildInfo = do
54− let pandocPath = (buildDir buildInfo) </> "pandoc" </> "pandoc"
53+makeManPages _ flags _ bi = do
54+ let pandocPath = (buildDir bi) </> "pandoc" </> "pandoc"
5555 makeManPage pandocPath (fromFlag $ buildVerbosity flags) "markdown2pdf.1"
5656 let testCmd = "runghc -package-conf=dist/package.conf.inplace MakeManPage.hs" -- makes pandoc.1 from README
5757 runCommand testCmd >>= waitForProcess >>= exitWith
src/Text/Pandoc.hs+12−6
@@ -146,13 +146,15 @@ readers :: [(String, ParserState -> String -> Pandoc)]
146146readers = [("native" , \_ -> read)
147147 ,("json" , \_ -> decodeJSON)
148148 ,("markdown" , readMarkdown)
149− ,("markdown+lhs" , readMarkdown)
149+ ,("markdown+lhs" , \st ->
150+ readMarkdown st{ stateLiterateHaskell = True})
150151 ,("rst" , readRST)
151152 ,("textile" , readTextile) -- TODO : textile+lhs
152153 ,("rst+lhs" , readRST)
153154 ,("html" , readHtml)
154155 ,("latex" , readLaTeX)
155− ,("latex+lhs" , readLaTeX)
156+ ,("latex+lhs" , \st ->
157+ readLaTeX st{ stateLiterateHaskell = True})
156158 ]
157159
158160-- | Association list of formats and writers (omitting the
@@ -161,21 +163,25 @@ writers :: [ ( String, WriterOptions -> Pandoc -> String ) ]
161163writers = [("native" , writeNative)
162164 ,("json" , \_ -> encodeJSON)
163165 ,("html" , writeHtmlString)
164− ,("html+lhs" , writeHtmlString)
166+ ,("html+lhs" , \o ->
167+ writeHtmlString o{ writerLiterateHaskell = True })
165168 ,("s5" , writeHtmlString)
166169 ,("slidy" , writeHtmlString)
167170 ,("docbook" , writeDocbook)
168171 ,("opendocument" , writeOpenDocument)
169172 ,("latex" , writeLaTeX)
170− ,("latex+lhs" , writeLaTeX)
173+ ,("latex+lhs" , \o ->
174+ writeLaTeX o{ writerLiterateHaskell = True })
171175 ,("context" , writeConTeXt)
172176 ,("texinfo" , writeTexinfo)
173177 ,("man" , writeMan)
174178 ,("markdown" , writeMarkdown)
175− ,("markdown+lhs" , writeMarkdown)
179+ ,("markdown+lhs" , \o ->
180+ writeMarkdown o{ writerLiterateHaskell = True })
176181 ,("plain" , writePlain)
177182 ,("rst" , writeRST)
178− ,("rst+lhs" , writeRST)
183+ ,("rst+lhs" , \o ->
184+ writeRST o{ writerLiterateHaskell = True })
179185 ,("mediawiki" , writeMediaWiki)
180186 ,("textile" , writeTextile)
181187 ,("rtf" , writeRTF)
src/Text/Pandoc/Shared.hs+2
@@ -481,6 +481,7 @@ data WriterOptions = WriterOptions
481481 , writerUserDataDir :: Maybe FilePath -- ^ Path of user data directory
482482 , writerCiteMethod :: CiteMethod -- ^ How to print cites
483483 , writerBiblioFiles :: [FilePath] -- ^ Biblio files to use for citations
484+ , writerHtml5 :: Bool -- ^ Produce HTML5
484485 } deriving Show
485486
486487-- | Default writer options.
@@ -510,6 +511,7 @@ defaultWriterOptions =
510511 , writerUserDataDir = Nothing
511512 , writerCiteMethod = Citeproc
512513 , writerBiblioFiles = []
514+ , writerHtml5 = False
513515 }
514516
515517--
src/Text/Pandoc/Writers/HTML.hs+40−14
@@ -170,6 +170,7 @@ inTemplate opts tit auths date toc body' newvars =
170170 , ("pagetitle", topTitle')
171171 , ("title", renderHtmlFragment tit)
172172 , ("date", date') ] ++
173+ [ ("html5","true") | writerHtml5 opts ] ++
173174 (case toc of
174175 Just t -> [ ("toc", renderHtmlFragment t)]
175176 Nothing -> []) ++
@@ -189,7 +190,12 @@ tableOfContents opts sects = do
189190 let tocList = catMaybes contents
190191 return $ if null tocList
191192 then Nothing
192− else Just $ thediv ! [prefixedId opts' "TOC"] $ unordList tocList
193+ else Just $
194+ if writerHtml5 opts
195+ then tag "nav" ! [prefixedId opts' "TOC"] $
196+ unordList tocList
197+ else thediv ! [prefixedId opts' "TOC"] $
198+ unordList tocList
193199
194200-- | Convert section number to string
195201showSecNum :: [Int] -> String
@@ -226,7 +232,9 @@ elementToHtml opts (Sec level num id' title' elements) = do
226232 return $ if slides -- S5 gets confused by the extra divs around sections
227233 then toHtmlFromList stuff
228234 else if writerSectionDivs opts
229− then thediv ! [prefixedId opts id'] << stuff
235+ then if writerHtml5 opts
236+ then tag "section" << stuff
237+ else thediv ! [prefixedId opts id'] << stuff
230238 else toHtmlFromList stuff
231239
232240-- | Convert list of Note blocks to a footnote <div>.
@@ -296,8 +304,11 @@ blockToHtml opts (Plain lst) = inlineListToHtml opts lst
296304blockToHtml opts (Para [Image txt (s,tit)]) = do
297305 img <- inlineToHtml opts (Image txt (s,tit))
298306 capt <- inlineListToHtml opts txt
299− return $ thediv ! [theclass "figure"] <<
300− [img, paragraph ! [theclass "caption"] << capt]
307+ return $ if writerHtml5 opts
308+ then tag "figure" <<
309+ [img, tag "figcaption" << capt]
310+ else thediv ! [theclass "figure"] <<
311+ [img, paragraph ! [theclass "caption"] << capt]
301312blockToHtml opts (Para lst) = inlineListToHtml opts lst >>= (return . paragraph)
302313blockToHtml _ (RawHtml str) = return $ primHtml str
303314blockToHtml _ (HorizontalRule) = return $ hr
@@ -368,7 +379,17 @@ blockToHtml opts (OrderedList (startnum, numstyle, _) lst) = do
368379 then [start startnum]
369380 else []) ++
370381 (if numstyle /= DefaultStyle
371− then [thestyle $ "list-style-type: " ++ numstyle' ++ ";"]
382+ then if writerHtml5 opts
383+ then [strAttr "type" $
384+ case numstyle of
385+ Decimal -> "1"
386+ LowerAlpha -> "a"
387+ UpperAlpha -> "A"
388+ LowerRoman -> "i"
389+ UpperRoman -> "I"
390+ _ -> "1"]
391+ else [thestyle $ "list-style-type: " ++
392+ numstyle']
372393 else [])
373394 return $ ordList ! attribs $ contents
374395blockToHtml opts (DefinitionList lst) = do
@@ -381,28 +402,30 @@ blockToHtml opts (DefinitionList lst) = do
381402 else []
382403 return $ dlist ! attribs << concat contents
383404blockToHtml opts (Table capt aligns widths headers rows') = do
384− let alignStrings = map alignmentToString aligns
385405 captionDoc <- if null capt
386406 then return noHtml
387407 else inlineListToHtml opts capt >>= return . caption
388408 let percent w = show (truncate (100*w) :: Integer) ++ "%"
409+ let widthAttrs w = if writerHtml5 opts
410+ then [thestyle $ "width: " ++ percent w]
411+ else [width $ percent w]
389412 let coltags = if all (== 0.0) widths
390413 then noHtml
391414 else concatHtml $ map
392− (\w -> col ! [width $ percent w] $ noHtml) widths
415+ (\w -> col ! (widthAttrs w) $ noHtml) widths
393416 head' <- if all null headers
394417 then return noHtml
395− else liftM (thead <<) $ tableRowToHtml opts alignStrings 0 headers
418+ else liftM (thead <<) $ tableRowToHtml opts aligns 0 headers
396419 body' <- liftM (tbody <<) $
397− zipWithM (tableRowToHtml opts alignStrings) [1..] rows'
420+ zipWithM (tableRowToHtml opts aligns) [1..] rows'
398421 return $ table $ captionDoc +++ coltags +++ head' +++ body'
399422
400423tableRowToHtml :: WriterOptions
401− -> [String]
424+ -> [Alignment]
402425 -> Int
403426 -> [[Block]]
404427 -> State WriterState Html
405−tableRowToHtml opts alignStrings rownum cols' = do
428+tableRowToHtml opts aligns rownum cols' = do
406429 let mkcell = if rownum == 0 then th else td
407430 let rowclass = case rownum of
408431 0 -> "header"
@@ -410,7 +433,7 @@ tableRowToHtml opts alignStrings rownum cols' = do
410433 _ -> "even"
411434 cols'' <- sequence $ zipWith
412435 (\alignment item -> tableItemToHtml opts mkcell alignment item)
413− alignStrings cols'
436+ aligns cols'
414437 return $ tr ! [theclass rowclass] $ toHtmlFromList cols''
415438
416439alignmentToString :: Alignment -> [Char]
@@ -422,12 +445,15 @@ alignmentToString alignment = case alignment of
422445
423446tableItemToHtml :: WriterOptions
424447 -> (Html -> Html)
425− -> [Char]
448+ -> Alignment
426449 -> [Block]
427450 -> State WriterState Html
428451tableItemToHtml opts tag' align' item = do
429452 contents <- blockListToHtml opts item
430− return $ tag' ! [align align'] $ contents
453+ let alignAttrs = if writerHtml5 opts
454+ then [thestyle $ "align: " ++ alignmentToString align']
455+ else [align $ alignmentToString align']
456+ return $ tag' ! alignAttrs $ contents
431457
432458blockListToHtml :: WriterOptions -> [Block] -> State WriterState Html
433459blockListToHtml opts lst =
src/pandoc.hs+12−2
@@ -41,7 +41,7 @@ import System.Exit ( exitWith, ExitCode (..) )
4141import System.FilePath
4242import System.Console.GetOpt
4343import Data.Char ( toLower )
44−import Data.List ( intercalate, isSuffixOf )
44+import Data.List ( intercalate, isSuffixOf, isPrefixOf )
4545import System.Directory ( getAppUserDataDirectory, doesFileExist )
4646import System.IO ( stdout, stderr )
4747import qualified Text.Pandoc.UTF8 as UTF8
@@ -102,6 +102,7 @@ data Opt = Opt
102102 , optOffline :: Bool -- ^ Make slideshow accessible offline
103103 , optXeTeX :: Bool -- ^ Format latex for xetex
104104 , optSmart :: Bool -- ^ Use smart typography
105+ , optHtml5 :: Bool -- ^ Produce HTML5 in HTML
105106 , optHTMLMathMethod :: HTMLMathMethod -- ^ Method to print HTML math
106107 , optReferenceODT :: Maybe FilePath -- ^ Path of reference.odt
107108 , optEPUBStylesheet :: Maybe String -- ^ EPUB stylesheet
@@ -142,6 +143,7 @@ defaultOpts = Opt
142143 , optOffline = False
143144 , optXeTeX = False
144145 , optSmart = False
146+ , optHtml5 = False
145147 , optHTMLMathMethod = PlainMath
146148 , optReferenceODT = Nothing
147149 , optEPUBStylesheet = Nothing
@@ -226,6 +228,11 @@ options =
226228 (\opt -> return opt { optSmart = True }))
227229 "" -- "Use smart quotes, dashes, and ellipses"
228230
231+ , Option "5" ["html5"]
232+ (NoArg
233+ (\opt -> return opt { optHtml5 = True }))
234+ "" -- "Produce HTML5 in HTML output"
235+
229236 , Option "m" ["latexmathml", "asciimathml"]
230237 (OptArg
231238 (\arg opt ->
@@ -629,6 +636,7 @@ main = do
629636 , optOffline = offline
630637 , optXeTeX = xetex
631638 , optSmart = smart
639+ , optHtml5 = html5
632640 , optHTMLMathMethod = mathMethod
633641 , optReferenceODT = referenceODT
634642 , optEPUBStylesheet = epubStylesheet
@@ -771,7 +779,9 @@ main = do
771779 else obfuscationMethod,
772780 writerIdentifierPrefix = idPrefix,
773781 writerSourceDirectory = sourceDir,
774− writerUserDataDir = datadir }
782+ writerUserDataDir = datadir,
783+ writerHtml5 = html5 &&
784+ "html" `isPrefixOf` writerName' }
775785
776786 when (isNonTextOutput writerName' && outputFile == "-") $
777787 do UTF8.hPutStrLn stderr ("Error: Cannot write " ++ writerName ++ " output to stdout.\n" ++
templates/html.template+26−3
@@ -1,14 +1,28 @@
1+$if(html5)$
2+<!DOCTYPE html>
3+<html$if(lang)$ lang="$lang$"$endif$>
4+$else$
15<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2−<html xmlns="http://www.w3.org/1999/xhtml">
6+<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$>
7+$endif$
38<head>
4− <title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title>
9+$if(html5)$
10+ <meta charset="utf-8" />
11+$else$
512 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13+$endif$
614 <meta name="generator" content="pandoc" />
715$for(author)$
816 <meta name="author" content="$author$" />
917$endfor$
1018$if(date)$
1119 <meta name="date" content="$date$" />
20+$endif$
21+ <title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title>
22+$if(html5)$
23+ <!--[if lt IE 9]>
24+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
25+ <![endif]-->
1226$endif$
1327$if(highlighting-css)$
1428 <style type="text/css">
@@ -16,11 +30,14 @@ $highlighting-css$
1630 </style>
1731$endif$
1832$for(css)$
19− <link rel="stylesheet" href="$css$" type="text/css" />
33+ <link rel="stylesheet" href="$css$" $if(html5)$$else$type="text/css" $endif$/>
2034$endfor$
2135$if(math)$
36+$if(html5)$
37+$else$
2238 $math$
2339$endif$
40+$endif$
2441$for(header-includes)$
2542 $header-includes$
2643$endfor$
@@ -30,7 +47,13 @@ $for(include-before)$
3047$include-before$
3148$endfor$
3249$if(title)$
50+$if(html5)$
51+<header>
52+$endif$
3353<h1 class="title">$title$</h1>
54+$if(html5)$
55+</header>
56+$endif$
3457$endif$
3558$if(toc)$
3659$toc$
templates/s5.template+1−1
@@ -1,7 +1,6 @@
11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
22<html xmlns="http://www.w3.org/1999/xhtml">
33<head>
4− <title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title>
54 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
65 <meta name="generator" content="pandoc" />
76$for(author)$
@@ -10,6 +9,7 @@ $endfor$
109$if(date)$
1110 <meta name="date" content="$date$" />
1211$endif$
12+ <title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title>
1313 <!-- configuration parameters -->
1414 <meta name="defaultView" content="slideshow" />
1515 <meta name="controlVis" content="hidden" />
templates/slidy.template+1−1
@@ -3,7 +3,6 @@
33 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
44<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
55<head>
6− <title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title>
76 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
87 <meta name="generator" content="pandoc" />
98$for(author)$
@@ -13,6 +12,7 @@ $if(date)$
1312 <meta name="date" content="$date$" />
1413$endif$
1514$if(highlighting-css)$
15+ <title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title>
1616 <style type="text/css">
1717$highlighting-css$
1818 </style>
tests/s5.basic.html+1−1
@@ -1,12 +1,12 @@
11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
22<html xmlns="http://www.w3.org/1999/xhtml">
33<head>
4− <title>My S5 Document</title>
54 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
65 <meta name="generator" content="pandoc" />
76 <meta name="author" content="Sam Smith" />
87 <meta name="author" content="Jen Jones" />
98 <meta name="date" content="July 15, 2006" />
9+ <title>My S5 Document</title>
1010 <!-- configuration parameters -->
1111 <meta name="defaultView" content="slideshow" />
1212 <meta name="controlVis" content="hidden" />
tests/s5.fancy.html+1−1
@@ -1,12 +1,12 @@
11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
22<html xmlns="http://www.w3.org/1999/xhtml">
33<head>
4− <title>My S5 Document</title>
54 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
65 <meta name="generator" content="pandoc" />
76 <meta name="author" content="Sam Smith" />
87 <meta name="author" content="Jen Jones" />
98 <meta name="date" content="July 15, 2006" />
9+ <title>My S5 Document</title>
1010 <!-- configuration parameters -->
1111 <meta name="defaultView" content="slideshow" />
1212 <meta name="controlVis" content="hidden" />
tests/s5.inserts.html+1−1
@@ -1,12 +1,12 @@
11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
22<html xmlns="http://www.w3.org/1999/xhtml">
33<head>
4− <title>My S5 Document</title>
54 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
65 <meta name="generator" content="pandoc" />
76 <meta name="author" content="Sam Smith" />
87 <meta name="author" content="Jen Jones" />
98 <meta name="date" content="July 15, 2006" />
9+ <title>My S5 Document</title>
1010 <link rel="stylesheet" href="main.css" type="text/css" />
1111 STUFF INSERTED
1212</head>
tests/writer.html+18−18
@@ -1,12 +1,12 @@
11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
22<html xmlns="http://www.w3.org/1999/xhtml">
33<head>
4− <title>Pandoc Test Suite</title>
54 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
65 <meta name="generator" content="pandoc" />
76 <meta name="author" content="John MacFarlane" />
87 <meta name="author" content="Anonymous" />
98 <meta name="date" content="July 17, 2006" />
9+ <title>Pandoc Test Suite</title>
1010</head>
1111<body>
1212<h1 class="title">Pandoc Test Suite</h1>
@@ -74,7 +74,7 @@
7474 ></pre
7575 ><p
7676 >A list:</p
77− ><ol style="list-style-type: decimal;"
77+ ><ol style="list-style-type: decimal"
7878 ><li
7979 >item one</li
8080 ><li
@@ -207,7 +207,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
207207>Ordered</h2
208208><p
209209>Tight:</p
210−><ol style="list-style-type: decimal;"
210+><ol style="list-style-type: decimal"
211211><li
212212 >First</li
213213 ><li
@@ -217,7 +217,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
217217 ></ol
218218><p
219219>and:</p
220−><ol style="list-style-type: decimal;"
220+><ol style="list-style-type: decimal"
221221><li
222222 >One</li
223223 ><li
@@ -227,7 +227,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
227227 ></ol
228228><p
229229>Loose using tabs:</p
230−><ol style="list-style-type: decimal;"
230+><ol style="list-style-type: decimal"
231231><li
232232 ><p
233233 >First</p
@@ -243,7 +243,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
243243 ></ol
244244><p
245245>and using spaces:</p
246−><ol style="list-style-type: decimal;"
246+><ol style="list-style-type: decimal"
247247><li
248248 ><p
249249 >One</p
@@ -259,7 +259,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
259259 ></ol
260260><p
261261>Multiple paragraphs:</p
262−><ol style="list-style-type: decimal;"
262+><ol style="list-style-type: decimal"
263263><li
264264 ><p
265265 >Item 1, graf one.</p
@@ -291,7 +291,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
291291 ></ul
292292><p
293293>Here’s another:</p
294−><ol style="list-style-type: decimal;"
294+><ol style="list-style-type: decimal"
295295><li
296296 >First</li
297297 ><li
@@ -309,7 +309,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
309309 ></ol
310310><p
311311>Same thing but with paragraphs:</p
312−><ol style="list-style-type: decimal;"
312+><ol style="list-style-type: decimal"
313313><li
314314 ><p
315315 >First</p
@@ -355,7 +355,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
355355 ></ul
356356><h2 id="fancy-list-markers"
357357>Fancy list markers</h2
358−><ol start="2" style="list-style-type: decimal;"
358+><ol start="2" style="list-style-type: decimal"
359359><li
360360 >begins with 2</li
361361 ><li
@@ -363,11 +363,11 @@ These should not be escaped: \$ \\ \&gt; \[ \{
363363 >and now 3</p
364364 ><p
365365 >with a continuation</p
366− ><ol start="4" style="list-style-type: lower-roman;"
366+ ><ol start="4" style="list-style-type: lower-roman"
367367 ><li
368368 >sublist with roman numerals, starting with 4</li
369369 ><li
370− >more items<ol style="list-style-type: upper-alpha;"
370+ >more items<ol style="list-style-type: upper-alpha"
371371 ><li
372372 >a subsublist</li
373373 ><li
@@ -379,13 +379,13 @@ These should not be escaped: \$ \\ \&gt; \[ \{
379379 ></ol
380380><p
381381>Nesting:</p
382−><ol style="list-style-type: upper-alpha;"
382+><ol style="list-style-type: upper-alpha"
383383><li
384− >Upper Alpha<ol style="list-style-type: upper-roman;"
384+ >Upper Alpha<ol style="list-style-type: upper-roman"
385385 ><li
386− >Upper Roman.<ol start="6" style="list-style-type: decimal;"
386+ >Upper Roman.<ol start="6" style="list-style-type: decimal"
387387 ><li
388− >Decimal start with 6<ol start="3" style="list-style-type: lower-alpha;"
388+ >Decimal start with 6<ol start="3" style="list-style-type: lower-alpha"
389389 ><li
390390 >Lower alpha with paren</li
391391 ></ol
@@ -559,7 +559,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
559559 ><dd
560560 ><p
561561 >orange fruit</p
562− ><ol style="list-style-type: decimal;"
562+ ><ol style="list-style-type: decimal"
563563 ><li
564564 >sublist</li
565565 ><li
@@ -1110,7 +1110,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
11101110 ></sup
11111111 ></p
11121112 ></blockquote
1113−><ol style="list-style-type: decimal;"
1113+><ol style="list-style-type: decimal"
11141114><li
11151115 >And in list items.<sup
11161116 ><a href="#fn5" class="footnoteRef" id="fnref5"