Changes to test suite for new XHTML output.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@550 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-02-27 07:05:11 +00:00
parent 59065c103f
commit 463a0e5c3e
7 changed files with 1230 additions and 1038 deletions

View file

@ -106,15 +106,14 @@ obfuscateLink opts txt src =
else text' ++ " (" ++ name ++ " at " ++
domain' ++ ")" in
if writerStrictMarkdown opts
then anchor ! [href $ obfuscateString src'] $
stringToHtml $ obfuscateString text'
then anchor ! [href $ obfuscateString src'] << obfuscateString text'
else (script ! [thetype "text/javascript"] $
primHtml ("\n<!--\nh='" ++
obfuscateString domain ++ "';a='" ++ at' ++ "';n='" ++
obfuscateString name ++ "';e=n+a+h;\n" ++
"document.write('<a h'+'ref'+'=\"ma'+'ilto'+':'+e+'\">'+" ++
linkText ++ "+'<\\/'+'a'+'>');\n// -->\n")) +++
noscript (stringToHtml $ obfuscateString altText)
noscript << obfuscateString altText
_ -> anchor ! [href src] $ inlineListToHtml opts txt -- malformed email
-- | Obfuscate character as entity.
@ -156,7 +155,7 @@ blockToHtml opts (Note ref lst) =
li ! [identifier ("fn" ++ ref)] $ contents +++ backlink
blockToHtml opts (Key _ _) = noHtml
blockToHtml opts (CodeBlock str) =
pre $ thecode $ stringToHtml (str ++ "\n") -- the final \n for consistency with Markdown.pl
pre $ thecode << (str ++ "\n") -- the final \n for consistency with Markdown.pl
blockToHtml opts (RawHtml str) = primHtml str
blockToHtml opts (BulletList lst) =
let attribs = if writerIncremental opts
@ -224,7 +223,7 @@ inlineToHtml opts (Emph lst) =
inlineToHtml opts (Strong lst) =
strong $ inlineListToHtml opts lst
inlineToHtml opts (Code str) =
thecode $ stringToHtml $ str
thecode << str
inlineToHtml opts (Quoted SingleQuote lst) =
primHtmlChar "lsquo" +++ inlineListToHtml opts lst +++ primHtmlChar "rsquo"
inlineToHtml opts (Quoted DoubleQuote lst) =
@ -249,12 +248,12 @@ inlineToHtml opts (Link txt (Ref ref)) =
']'
-- this is what markdown does, for better or worse
inlineToHtml opts (Image alttext (Src source tit)) =
let alternate = renderHtml $ inlineListToHtml opts alttext in
let alternate = renderHtmlFragment $ inlineListToHtml opts alttext in
image ! ([src source, title tit] ++ if null alttext then [] else [alt alternate])
-- note: null title is included, as in Markdown.pl
inlineToHtml opts (Image alternate (Ref ref)) =
'!' +++ inlineToHtml opts (Link alternate (Ref ref))
inlineToHtml opts (NoteRef ref) =
anchor ! [href ("#fn" ++ ref), theclass "footnoteRef", identifier ("fnref" ++ ref)] $
sup (stringToHtml ref)
anchor ! [href ("#fn" ++ ref), theclass "footnoteRef", identifier ("fnref" ++ ref)] <<
sup << ref

View file

@ -1,11 +1,16 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- configuration parameters -->
<html
><head
><title
>My S5 Document</title
><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
/><meta name="generator" content="pandoc"
/><meta name="author" content="Sam Smith"
/><meta name="author" content="Jen Jones"
/><meta name="date" content="July 15, 2006"
/><!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<meta name="controlVis" content="hidden" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="pandoc" />
<style type="text/css" media="projection" id="slideProj">
/* Do not edit or override these styles! The system will likely break if you do. */
@ -737,51 +742,48 @@ function startup() {
window.onload = startup;
window.onresize = function(){setTimeout('fontScale()', 50);}</script>
<meta name="author" content="Sam Smith, Jen Jones" />
<meta name="date" content="July 15, 2006" />
<title>My S5 Document</title>
</head>
<body>
<div class="layout">
</head
><body
><div class="layout">
<div id="controls"></div>
<div id="currentSlide"></div>
<div id="header"></div>
<div id="footer">
<h1>July 15, 2006</h1>
<h2>My S5 Document</h2>
<h1
>July 15, 2006</h1
><h2
>My S5 Document</h2
></div>
</div>
</div>
<div class="presentation">
<div class="slide">
<h1>My S5 Document</h1>
<h3>Sam Smith, Jen Jones</h3>
<h4>July 15, 2006</h4>
</div>
<h1
>My S5 Document</h1
><h3
>Sam Smith, Jen Jones</h3
><h4
>July 15, 2006</h4
></div>
<div class="slide">
<h1>First slide</h1>
<ul>
<li>first bullet</li>
<li>second bullet</li>
</ul>
</div>
<h1
>First slide</h1
><ul
><li
>first bullet</li
><li
>second bullet</li
></ul
></div>
<div class="slide">
<h1>Math</h1>
<ul>
<li>$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</li>
</ul>
<h1
>Math</h1
><ul
><li
>$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</li
></ul
></div>
</div>
</div>
</body>
</html>
</body
></html
>

View file

@ -1,11 +1,16 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- configuration parameters -->
<html
><head
><title
>My S5 Document</title
><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
/><meta name="generator" content="pandoc"
/><meta name="author" content="Sam Smith"
/><meta name="author" content="Jen Jones"
/><meta name="date" content="July 15, 2006"
/><!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<meta name="controlVis" content="hidden" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="pandoc" />
<style type="text/css" media="projection" id="slideProj">
/* Do not edit or override these styles! The system will likely break if you do. */
@ -1649,51 +1654,48 @@ else
}
}
</script>
<meta name="author" content="Sam Smith, Jen Jones" />
<meta name="date" content="July 15, 2006" />
<title>My S5 Document</title>
</head>
<body>
<div class="layout">
</head
><body
><div class="layout">
<div id="controls"></div>
<div id="currentSlide"></div>
<div id="header"></div>
<div id="footer">
<h1>July 15, 2006</h1>
<h2>My S5 Document</h2>
<h1
>July 15, 2006</h1
><h2
>My S5 Document</h2
></div>
</div>
</div>
<div class="presentation">
<div class="slide">
<h1>My S5 Document</h1>
<h3>Sam Smith, Jen Jones</h3>
<h4>July 15, 2006</h4>
</div>
<h1
>My S5 Document</h1
><h3
>Sam Smith, Jen Jones</h3
><h4
>July 15, 2006</h4
></div>
<div class="slide">
<h1>First slide</h1>
<ul class="incremental">
<li>first bullet</li>
<li>second bullet</li>
</ul>
</div>
<h1
>First slide</h1
><ul class="incremental"
><li
>first bullet</li
><li
>second bullet</li
></ul
></div>
<div class="slide">
<h1>Math</h1>
<ul class="incremental">
<li>$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</li>
</ul>
<h1
>Math</h1
><ul class="incremental"
><li
>$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</li
></ul
></div>
</div>
</div>
</body>
</html>
</body
></html
>

View file

@ -1,9 +1,15 @@
<h1>First slide</h1>
<ul>
<li>first bullet</li>
<li>second bullet</li>
</ul>
<h1>Math</h1>
<ul>
<li>$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</li>
</ul>
<h1
>First slide</h1
><ul
><li
>first bullet</li
><li
>second bullet</li
></ul
><h1
>Math</h1
><ul
><li
>$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</li
></ul
>

View file

@ -1,32 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="pandoc" />
<link rel="stylesheet" href="main.css" type="text/css" media="all" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
><head
><title
>My S5 Document</title
><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
/><meta name="generator" content="pandoc"
/><meta name="author" content="Sam Smith"
/><meta name="author" content="Jen Jones"
/><meta name="date" content="July 15, 2006"
/><link rel="stylesheet" href="main.css" type="text/css" media="all" />
STUFF INSERTED
<meta name="author" content="Sam Smith, Jen Jones" />
<meta name="date" content="July 15, 2006" />
<title>My S5 Document</title>
</head>
<body>
STUFF INSERTED
<h1 class="title">
My S5 Document
</h1>
<h1>First slide</h1>
<ul>
<li>first bullet</li>
<li>second bullet</li>
</ul>
<h1>Math</h1>
<ul>
<li>$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</li>
</ul>
STUFF INSERTED
</body>
</html>
</head
><body
>STUFF INSERTED
<h1 class="title"
>My S5 Document</h1
><h1
>First slide</h1
><ul
><li
>first bullet</li
><li
>second bullet</li
></ul
><h1
>Math</h1
><ul
><li
>$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</li
></ul
>STUFF INSERTED
</body
></html
>

View file

@ -1,138 +1,207 @@
<p>
Simple table with caption:
</p>
<table>
<caption>Demonstration of simple table syntax.</caption>
<tr>
<th align="right" style="{width: 15%;}">Right</th>
<th align="left" style="{width: 8%;}">Left</th>
<th align="center" style="{width: 16%;}">Center</th>
<th align="left" style="{width: 12%;}">Default</th>
</tr>
<tr>
<td align="right">12</td>
<td align="left">12</td>
<td align="center">12</td>
<td align="left">12</td>
</tr>
<tr>
<td align="right">123</td>
<td align="left">123</td>
<td align="center">123</td>
<td align="left">123</td>
</tr>
<tr>
<td align="right">1</td>
<td align="left">1</td>
<td align="center">1</td>
<td align="left">1</td>
</tr>
</table>
<p>
Simple table without caption:
</p>
<table>
<tr>
<th align="right" style="{width: 15%;}">Right</th>
<th align="left" style="{width: 8%;}">Left</th>
<th align="center" style="{width: 16%;}">Center</th>
<th align="left" style="{width: 12%;}">Default</th>
</tr>
<tr>
<td align="right">12</td>
<td align="left">12</td>
<td align="center">12</td>
<td align="left">12</td>
</tr>
<tr>
<td align="right">123</td>
<td align="left">123</td>
<td align="center">123</td>
<td align="left">123</td>
</tr>
<tr>
<td align="right">1</td>
<td align="left">1</td>
<td align="center">1</td>
<td align="left">1</td>
</tr>
</table>
<p>
Simple table indented two spaces:
</p>
<table>
<caption>Demonstration of simple table syntax.</caption>
<tr>
<th align="right" style="{width: 15%;}">Right</th>
<th align="left" style="{width: 8%;}">Left</th>
<th align="center" style="{width: 16%;}">Center</th>
<th align="left" style="{width: 12%;}">Default</th>
</tr>
<tr>
<td align="right">12</td>
<td align="left">12</td>
<td align="center">12</td>
<td align="left">12</td>
</tr>
<tr>
<td align="right">123</td>
<td align="left">123</td>
<td align="center">123</td>
<td align="left">123</td>
</tr>
<tr>
<td align="right">1</td>
<td align="left">1</td>
<td align="center">1</td>
<td align="left">1</td>
</tr>
</table>
<p>
Multiline table with caption:
</p>
<table>
<caption>Here's the caption. It may span multiple lines.</caption>
<tr>
<th align="center" style="{width: 15%;}">Centered Header</th>
<th align="left" style="{width: 13%;}">Left Aligned</th>
<th align="right" style="{width: 16%;}">Right Aligned</th>
<th align="left" style="{width: 33%;}">Default aligned</th>
</tr>
<tr>
<td align="center">First</td>
<td align="left">row</td>
<td align="right">12.0</td>
<td align="left">Example of a row that spans multiple lines.</td>
</tr>
<tr>
<td align="center">Second</td>
<td align="left">row</td>
<td align="right">5.0</td>
<td align="left">Here's another one. Note the blank line between
rows.</td>
</tr>
</table>
<p>
Multiline table without caption:
</p>
<table>
<tr>
<th align="center" style="{width: 15%;}">Centered Header</th>
<th align="left" style="{width: 13%;}">Left Aligned</th>
<th align="right" style="{width: 16%;}">Right Aligned</th>
<th align="left" style="{width: 33%;}">Default aligned</th>
</tr>
<tr>
<td align="center">First</td>
<td align="left">row</td>
<td align="right">12.0</td>
<td align="left">Example of a row that spans multiple lines.</td>
</tr>
<tr>
<td align="center">Second</td>
<td align="left">row</td>
<td align="right">5.0</td>
<td align="left">Here's another one. Note the blank line between
rows.</td>
</tr>
</table>
<p
>Simple table with caption:</p
><table
><caption
>Demonstration of simple table syntax.</caption
><tr
><th align="right" style="{width: 15%;}"
>Right</th
><th align="left" style="{width: 8%;}"
>Left</th
><th align="center" style="{width: 16%;}"
>Center</th
><th align="left" style="{width: 12%;}"
>Default</th
></tr
><tr
><td align="right"
>12</td
><td align="left"
>12</td
><td align="center"
>12</td
><td align="left"
>12</td
></tr
><tr
><td align="right"
>123</td
><td align="left"
>123</td
><td align="center"
>123</td
><td align="left"
>123</td
></tr
><tr
><td align="right"
>1</td
><td align="left"
>1</td
><td align="center"
>1</td
><td align="left"
>1</td
></tr
></table
><p
>Simple table without caption:</p
><table
><tr
><th align="right" style="{width: 15%;}"
>Right</th
><th align="left" style="{width: 8%;}"
>Left</th
><th align="center" style="{width: 16%;}"
>Center</th
><th align="left" style="{width: 12%;}"
>Default</th
></tr
><tr
><td align="right"
>12</td
><td align="left"
>12</td
><td align="center"
>12</td
><td align="left"
>12</td
></tr
><tr
><td align="right"
>123</td
><td align="left"
>123</td
><td align="center"
>123</td
><td align="left"
>123</td
></tr
><tr
><td align="right"
>1</td
><td align="left"
>1</td
><td align="center"
>1</td
><td align="left"
>1</td
></tr
></table
><p
>Simple table indented two spaces:</p
><table
><caption
>Demonstration of simple table syntax.</caption
><tr
><th align="right" style="{width: 15%;}"
>Right</th
><th align="left" style="{width: 8%;}"
>Left</th
><th align="center" style="{width: 16%;}"
>Center</th
><th align="left" style="{width: 12%;}"
>Default</th
></tr
><tr
><td align="right"
>12</td
><td align="left"
>12</td
><td align="center"
>12</td
><td align="left"
>12</td
></tr
><tr
><td align="right"
>123</td
><td align="left"
>123</td
><td align="center"
>123</td
><td align="left"
>123</td
></tr
><tr
><td align="right"
>1</td
><td align="left"
>1</td
><td align="center"
>1</td
><td align="left"
>1</td
></tr
></table
><p
>Multiline table with caption:</p
><table
><caption
>Here's the caption. It may span multiple lines.</caption
><tr
><th align="center" style="{width: 15%;}"
>Centered Header</th
><th align="left" style="{width: 13%;}"
>Left Aligned</th
><th align="right" style="{width: 16%;}"
>Right Aligned</th
><th align="left" style="{width: 33%;}"
>Default aligned</th
></tr
><tr
><td align="center"
>First</td
><td align="left"
>row</td
><td align="right"
>12.0</td
><td align="left"
>Example of a row that spans multiple lines.</td
></tr
><tr
><td align="center"
>Second</td
><td align="left"
>row</td
><td align="right"
>5.0</td
><td align="left"
>Here's another one. Note the blank line between rows.</td
></tr
></table
><p
>Multiline table without caption:</p
><table
><tr
><th align="center" style="{width: 15%;}"
>Centered Header</th
><th align="left" style="{width: 13%;}"
>Left Aligned</th
><th align="right" style="{width: 16%;}"
>Right Aligned</th
><th align="left" style="{width: 33%;}"
>Default aligned</th
></tr
><tr
><td align="center"
>First</td
><td align="left"
>row</td
><td align="right"
>12.0</td
><td align="left"
>Example of a row that spans multiple lines.</td
></tr
><tr
><td align="center"
>Second</td
><td align="left"
>row</td
><td align="right"
>5.0</td
><td align="left"
>Here's another one. Note the blank line between rows.</td
></tr
></table
>

File diff suppressed because it is too large Load diff