Update to latest HTML5lib, Add Maruku testdir

Sync with the latest html5lib.
Having the Maruku unit tests on-hand may be useful for debugging; so let's include them.
This commit is contained in:
Jacques Distler 2008-01-08 00:01:35 -06:00
parent ebc409e1a0
commit 1085168bbf
337 changed files with 21290 additions and 72 deletions

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<html xmlns:svg='http://www.w3.org/2000/svg' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head><meta content='application/xhtml+xml;charset=utf-8' http-equiv='Content-type' /><title>$$ x</title></head>
<body>
<p>$$ x = y $$</p>
<h1 id='_x'>$$ x</h1>
<p>$$ x = y $$</p>
<p>$$ x = y $$</p>
</body></html>

View file

@ -0,0 +1,69 @@
Write a comment here
*** Parameters: ***
{}
*** Markdown input: ***
$$ x = y $$
$$ x
= y $$
$$
x = y $$
$$ x = y
$$
*** Output of inspect ***
md_el(:document,[
md_par(["$$ x = y $$"]),
md_el(:header,["$$ x"],{:level=>1},[]),
md_par(["$$ x = y $$"]),
md_par(["$$ x = y $$"])
],{},[])
*** Output of to_html ***
<p>$$ x = y $$</p>
<h1 id='_x'>$$ x</h1>
<p>$$ x = y $$</p>
<p>$$ x = y $$</p>
*** Output of to_latex ***
\$\$ x = y \$\$
\hypertarget{_x}{}\section*{{\$\$ x}}\label{_x}
\$\$ x = y \$\$
\$\$ x = y \$\$
*** Output of to_md ***
$$ x = y $$
$$ x$$ x = y $$
$$ x = y $$
*** Output of to_s ***
$$ x = y $$$$ x$$ x = y $$$$ x = y $$
*** EOF ***
OK!
*** Output of Markdown.pl ***
<p>$$ x = y $$</p>
<p>$$ x
= y $$</p>
<p>$$
x = y $$</p>
<p>$$ x = y
$$</p>
*** Output of Markdown.pl (parsed) ***
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<html xmlns:svg='http://www.w3.org/2000/svg' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head><meta content='application/xhtml+xml;charset=utf-8' http-equiv='Content-type' /><title></title></head>
<body>
<p>Here are some formulas:</p>
<ul>
<li><span class='maruku-inline'><math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math></span></li>
<li><span class='maruku-inline'><math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><msup><mi>x</mi> <mi>n</mi></msup><mo>+</mo><msup><mi>y</mi> <mi>n</mi></msup><mo>&ne;</mo><msup><mi>z</mi> <mi>n</mi></msup></math></span></li>
</ul>
<p>That&#8217;s it, nothing else is supported.</p>
</body></html>

View file

@ -0,0 +1,101 @@
*** Parameters: ***
require 'maruku/ext/math'; {}
*** Markdown input: ***
Here are some formulas:
* $\alpha$
* $x^{n}+y^{n} \neq z^{n}$
That's it, nothing else is supported.
*** Output of inspect ***
md_el(:document,[
md_par(["Here are some formulas:"]),
md_el(:ul,[
md_el(:li_span,[md_el(:inline_math,[],{:math=>"\\alpha"},[])],{:want_my_paragraph=>false},[]),
md_el(:li_span,[md_el(:inline_math,[],{:math=>"x^{n}+y^{n} \\neq z^{n}"},[])],{:want_my_paragraph=>false},[])
],{},[]),
md_par(["That", md_entity("rsquo"), "s it, nothing else is supported."])
],{},[])
*** Output of to_html ***
<p>Here are some formulas:</p>
<ul>
<li><span class='maruku-inline'><code class='maruku-mathml'>\alpha</code></span></li>
<li><span class='maruku-inline'><code class='maruku-mathml'>x^{n}+y^{n} \neq z^{n}</code></span></li>
</ul>
<p>That&#8217;s it, nothing else is supported.</p>
*** Output of to_latex ***
Here are some formulas:
\begin{itemize}%
\item $\alpha$
\item $x^{n}+y^{n} \neq z^{n}$
\end{itemize}
That'{}s it, nothing else is supported.
*** Output of to_md ***
Here are some formulas:
--
That s it, nothing else is supported.
*** Output of to_s ***
Here are some formulas:Thats it, nothing else is supported.
*** EOF ***
Failed tests: [:to_html]
*** Output of inspect ***
md_el(:document,[
md_par(["Here are some formulas:"]),
md_el(:ul,[
md_el(:li_span,[md_el(:inline_math,[],{:math=>"\\alpha"},[])],{:want_my_paragraph=>false},[]),
md_el(:li_span,[md_el(:inline_math,[],{:math=>"x^{n}+y^{n} \\neq z^{n}"},[])],{:want_my_paragraph=>false},[])
],{},[]),
md_par(["That", md_entity("rsquo"), "s it, nothing else is supported."])
],{},[])
*** Output of to_html ***
-----| WARNING | -----
<p>Here are some formulas:</p>
<ul>
<li><span class='maruku-inline'><math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math></span></li>
<li><span class='maruku-inline'><math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><msup><mi>x</mi> <mi>n</mi></msup><mo>+</mo><msup><mi>y</mi> <mi>n</mi></msup><mo>&ne;</mo><msup><mi>z</mi> <mi>n</mi></msup></math></span></li>
</ul>
<p>That&#8217;s it, nothing else is supported.</p>
*** Output of to_latex ***
Here are some formulas:
\begin{itemize}%
\item $\alpha$
\item $x^{n}+y^{n} \neq z^{n}$
\end{itemize}
That'{}s it, nothing else is supported.
*** Output of to_md ***
Here are some formulas:
--
That s it, nothing else is supported.
*** Output of to_s ***
Here are some formulas:Thats it, nothing else is supported.
*** Output of Markdown.pl ***
<p>Here are some formulas:</p>
<ul>
<li>$\alpha$</li>
<li>$x^{n}+y^{n} \neq z^{n}$</li>
</ul>
<p>That's it, nothing else is supported.</p>
*** Output of Markdown.pl (parsed) ***
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<html xmlns:svg='http://www.w3.org/2000/svg' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head><meta content='application/xhtml+xml;charset=utf-8' http-equiv='Content-type' /><title></title></head>
<body><div class='maruku-equation' id='eq:eq1'><span class='maruku-eq-number'>(1)</span><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \alpha
</code></div></div><div class='maruku-equation'><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \alpha
</code></div></div><div class='maruku-equation'><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&beta;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \beta
</code></div></div><div class='maruku-equation'><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&gamma;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \gamma </code></div></div></body></html>

View file

@ -0,0 +1,74 @@
*** Parameters: ***
require 'maruku/ext/math'
{:math_numbered => ['\\['], :html_math_engine => 'itex2mml' }
*** Markdown input: ***
\[
\alpha
\]
\begin{equation}
\alpha
\end{equation}
\begin{equation} \beta
\end{equation}
\begin{equation} \gamma \end{equation}
*** Output of inspect ***
md_el(:document,[
md_el(:equation,[],{:label=>"eq1",:math=>"\t\\alpha\n\n",:num=>1},[]),
md_el(:equation,[],{:label=>nil,:math=>"\t\\alpha\n\n",:num=>nil},[]),
md_el(:equation,[],{:label=>nil,:math=>" \\beta\n",:num=>nil},[]),
md_el(:equation,[],{:label=>nil,:math=>" \\gamma ",:num=>nil},[])
],{},[])
*** Output of to_html ***
<div class='maruku-equation' id='eq:eq1'><span class='maruku-eq-number'>(1)</span><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \alpha
</code></div></div><div class='maruku-equation'><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \alpha
</code></div></div><div class='maruku-equation'><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&beta;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \beta
</code></div></div><div class='maruku-equation'><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&gamma;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \gamma </code></div></div>
*** Output of to_latex ***
\begin{equation}
\alpha
\label{eq1}\end{equation}
\begin{displaymath}
\alpha
\end{displaymath}
\begin{displaymath}
\beta
\end{displaymath}
\begin{displaymath}
\gamma
\end{displaymath}
*** Output of to_md ***
*** Output of to_s ***
*** EOF ***
OK!
*** Output of Markdown.pl ***
<p>[
\alpha
]</p>
<p>\begin{equation}
\alpha
\end{equation}</p>
<p>\begin{equation} \beta
\end{equation}</p>
<p>\begin{equation} \gamma \end{equation}</p>
*** Output of Markdown.pl (parsed) ***
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<html xmlns:svg='http://www.w3.org/2000/svg' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head><meta content='application/xhtml+xml;charset=utf-8' http-equiv='Content-type' /><title></title></head>
<body>
<p>This is not $math$.</p>
<p>[ \alpha ]</p>
</body></html>

View file

@ -0,0 +1,40 @@
*** Parameters: ***
require 'maruku/ext/math'; {:math_enabled => false}
*** Markdown input: ***
This is not $math$.
\[ \alpha \]
*** Output of inspect ***
md_el(:document,[md_par(["This is not $math$."]), md_par(["[ \\alpha ]"])],{},[])
*** Output of to_html ***
<p>This is not $math$.</p>
<p>[ \alpha ]</p>
*** Output of to_latex ***
This is not \$math\$.
[ $\backslash$alpha ]
*** Output of to_md ***
This is not $math$.
[ \alpha ]
*** Output of to_s ***
This is not $math$.[ \alpha ]
*** EOF ***
OK!
*** Output of Markdown.pl ***
<p>This is not $math$.</p>
<p>[ \alpha ]</p>
*** Output of Markdown.pl (parsed) ***
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<html xmlns:svg='http://www.w3.org/2000/svg' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head><meta content='application/xhtml+xml;charset=utf-8' http-equiv='Content-type' /><title></title></head>
<body /></html>

View file

@ -0,0 +1,58 @@
Write a comment here
*** Parameters: ***
{}
*** Markdown input: ***
<table markdown='1'>
$\alpha$
<thead>
<td>$\beta$</td>
</thead>
</table>
*** Output of inspect ***
md_el(:document,[
md_html("<table markdown='1'>\n\t$\\alpha$\n\t<thead>\n\t\t<td>$\\beta$</td>\n\t</thead>\n</table>")
],{},[])
*** Output of to_html ***
<table><span class='maruku-inline'><code class='maruku-mathml'>\alpha</code></span><thead>
<td><span class='maruku-inline'><code class='maruku-mathml'>\beta</code></span></td>
</thead>
</table>
*** Output of to_latex ***
*** Output of to_md ***
*** Output of to_s ***
*** EOF ***
Failed tests: [:to_html]
*** Output of inspect ***
md_el(:document,[
md_html("<table markdown='1'>\n\t$\\alpha$\n\t<thead>\n\t\t<td>$\\beta$</td>\n\t</thead>\n</table>")
],{},[])
*** Output of to_html ***
-----| WARNING | -----
<table><span class='maruku-inline'><math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math></span><thead>
<td><span class='maruku-inline'><math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&beta;</mi></math></span></td>
</thead>
</table>
*** Output of to_latex ***
*** Output of to_md ***
*** Output of to_s ***
*** Output of Markdown.pl ***
<table markdown='1'>
$\alpha$
<thead>
<td>$\beta$</td>
</thead>
</table>
*** Output of Markdown.pl (parsed) ***
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<html xmlns:svg='http://www.w3.org/2000/svg' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head><meta content='application/xhtml+xml;charset=utf-8' http-equiv='Content-type' /><title></title></head>
<body><table><thead><tr><th>Symbol</th><th>Meaning</th><th>comments</th></tr></thead><tbody><tr><th scope='row' style='text-align: left;'> &#945;</th><td style='text-align: left;'>The first</td><td style='text-align: left;'>I like it.</td>
</tr><tr><th scope='row' style='text-align: left;'> &aleph;</th><td style='text-align: left;'>The first</td><td style='text-align: left;'>I like it.</td>
</tr></tbody></table></body></html>

View file

@ -0,0 +1,60 @@
Write a comment here
*** Parameters: ***
{}
*** Markdown input: ***
Symbol | Meaning | comments
------------|---------|---------
{:r} &alpha; | The first | I like it.
{:r} &aleph; | The first | I like it.
{:r: scope='row'}
*** Output of inspect ***
md_el(:document,[
md_el(:table,[
md_el(:head_cell,["Symbol"],{},[]),
md_el(:head_cell,["Meaning"],{},[]),
md_el(:head_cell,["comments"],{},[]),
md_el(:cell,[" ", md_entity("alpha")],{},[[:ref, "r"]]),
md_el(:cell,["The first"],{},[]),
md_el(:cell,["I like it."],{},[]),
md_el(:cell,[" ", md_entity("aleph")],{},[[:ref, "r"]]),
md_el(:cell,["The first"],{},[]),
md_el(:cell,["I like it."],{},[])
],{:align=>[:left, :left, :left]},[]),
md_el(:ald,[],{:ald=>[["scope", "row"]],:ald_id=>"r"},[])
],{},[])
*** Output of to_html ***
<table><thead><tr><th>Symbol</th><th>Meaning</th><th>comments</th></tr></thead><tbody><tr><th scope='row' style='text-align: left;'> &#945;</th><td style='text-align: left;'>The first</td><td style='text-align: left;'>I like it.</td>
</tr><tr><th scope='row' style='text-align: left;'> &aleph;</th><td style='text-align: left;'>The first</td><td style='text-align: left;'>I like it.</td>
</tr></tbody></table>
*** Output of to_latex ***
\begin{tabular}{l|l|l}
Symbol&Meaning&comments\\
\hline
$\alpha${}&The first&I like it.\\
&The first&I like it.\\
\end{tabular}
*** Output of to_md ***
SymbolMeaningcomments The firstI like it. The firstI like it.
*** Output of to_s ***
SymbolMeaningcomments The firstI like it. The firstI like it.
*** EOF ***
OK!
*** Output of Markdown.pl ***
<p>Symbol | Meaning | comments
------------|---------|---------
{:r} &alpha; | The first | I like it.
{:r} &aleph; | The first | I like it.</p>
<p>{:r: scope='row'}</p>
*** Output of Markdown.pl (parsed) ***
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>