instiki/vendor/plugins/maruku/tests/unittest/inline_html.md
Jacques Distler 1085168bbf 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.
2008-01-08 00:01:35 -06:00

6.4 KiB

Write a comment abouth the test here. *** Parameters: *** {:css=>"style.css"} *** Markdown input: *** CSS: style.css

Input:

<em>Emphasis</em>

Result: Emphasis

Input:

<img src="http://jigsaw.w3.org/css-validator/images/vcss"/>

Result on span:

Result alone:

Without closing:

This is *true* markdown text (paragraph)
<p markdown="1">
	This is *true* markdown text (no paragraph)
</p>
<p markdown="block">
	This is *true* markdown text (block paragraph)
</p>
This is *true* markdown text. (no par) This is *true* markdown text. (par)

The following is invalid HTML, and will generate an error:

This is *true* markdown text. (no par) This is *true* markdown text. (par)

*** Output of inspect *** md_el(:document,[ md_par(["Input:"]), md_el(:code,[],{:raw_code=>"Emphasis"},[]), md_par(["Result: ", md_html("Emphasis")]), md_par(["Input:"]), md_el(:code,[],{:raw_code=>"<img src="http://jigsaw.w3.org/css-validator/images/vcss"/>"},[]), md_par([ "Result on span: ", md_html("<img src="http://jigsaw.w3.org/css-validator/images/vcss" />") ]), md_par(["Result alone:"]), md_html("<img src="http://jigsaw.w3.org/css-validator/images/vcss" />"), md_par(["Without closing:"]), md_html("<img src="http://jigsaw.w3.org/css-validator/images/vcss" />"), md_html("<div markdown="1">\n\tThis is true markdown text (paragraph)\n\n\t<p markdown="1">\n\t\tThis is true markdown text (no paragraph)\n\t

\n\t<p markdown="block">\n\t\tThis is true markdown text (block paragraph)\n\t

\n"), md_html("\n\n<td markdown="1">This is true markdown text. (no par)\n<td markdown="block">This is true markdown text. (par)\n\n
"), md_par(["The following is invalid HTML, and will generate an error:"]), md_html("\n<td markdown="1">This is true markdown text. (no par)\n<td markdown="block">This is true markdown text. (par)\n"), md_html("
") ],{},[]) *** Output of to_html ***

Input:

<em>Emphasis</em>

Result: Emphasis

Input:

<img src="http://jigsaw.w3.org/css-validator/images/vcss"/>

Result on span:

Result alone:

Without closing:

This is

true

markdown text (paragraph)

This is

true

markdown text (no paragraph)

This is

true

markdown text (block paragraph)

This is

true

markdown text. (no par)

This is

true

markdown text. (par)

The following is invalid HTML, and will generate an error:

HTML parse error: 
<table>
<td markdown="1">This is *true* markdown text. (no par)</td>
<td markdown="block">This is *true* markdown text. (par)</td>
</tr>
HTML parse error: 
</table>
*** Output of to_latex *** Input:

\begin{verbatim}Emphasis\end{verbatim} Result:

Input:

\begin{verbatim}\end{verbatim} Result on span:

Result alone:

Without closing:

The following is invalid HTML, and will generate an error: *** Output of to_md *** Input:

Result:

Input:

Result on span:

Result alone:

Without closing:

The following is invalid HTML, and will generate an error: *** Output of to_s *** Input:Result: Input:Result on span: Result alone:Without closing:The following is invalid HTML, and will generate an error: *** EOF ***

OK!

*** Output of Markdown.pl ***

CSS: style.css

Input:

<em>Emphasis</em>

Result: Emphasis

Input:

<img src="http://jigsaw.w3.org/css-validator/images/vcss"/>

Result on span:

Result alone:

Without closing:

This is *true* markdown text (paragraph)
<p markdown="1">
    This is *true* markdown text (no paragraph)
</p>
<p markdown="block">
    This is *true* markdown text (block paragraph)
</p>
This is *true* markdown text. (no par) This is *true* markdown text. (par)

The following is invalid HTML, and will generate an error:

This is *true* markdown text. (no par) This is *true* markdown text. (par)

*** Output of Markdown.pl (parsed) *** Error: #<REXML::ParseException: #<REXML::ParseException: Missing end tag for 'img' (got "p") Line: Position: Last 80 unconsumed characters:

This is *true* markdown text (paragraph)

/sw/lib/ruby/1.8/rexml/parsers/baseparser.rb:320:in `pull' /sw/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse' /sw/lib/ruby/1.8/rexml/document.rb:190:in `build' /sw/lib/ruby/1.8/rexml/document.rb:45:in `initialize' bin/marutest:200:in `new' bin/marutest:200:in `run_test' bin/marutest:263:in `marutest' bin/marutest:260:in `each' bin/marutest:260:in `marutest' bin/marutest:335 ... Missing end tag for 'img' (got "p") Line: Position: Last 80 unconsumed characters:

This is *true* markdown text (paragraph)

This is *true* markdown text (paragraph)