REXML is dead. Long live Nokogiri.
Modify Maruku to use Nokogiri instead of REXML. Produces a 3-fold speedup in the #to_html method.
This commit is contained in:
parent
46da1f3aaf
commit
13a522525c
369 changed files with 1703 additions and 16342 deletions
20
vendor/plugins/maruku/spec/block_docs/attributes/att2.md
vendored
Normal file
20
vendor/plugins/maruku/spec/block_docs/attributes/att2.md
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
*** Parameters: ***
|
||||
{}
|
||||
*** Markdown input: ***
|
||||
{a}: a
|
||||
{:b: a}
|
||||
|
||||
*** Output of inspect ***
|
||||
md_el(:document,[
|
||||
md_el(:ald,[],{:ald=>[[:ref, "a"]],:ald_id=>"a"},[]),
|
||||
md_el(:ald,[],{:ald=>[[:ref, "a"]],:ald_id=>"b"},[])
|
||||
],{},[])
|
||||
*** Output of to_html ***
|
||||
|
||||
*** Output of to_latex ***
|
||||
|
||||
*** Output of to_md ***
|
||||
|
||||
*** Output of to_s ***
|
||||
|
28
vendor/plugins/maruku/spec/block_docs/attributes/att3.md
vendored
Normal file
28
vendor/plugins/maruku/spec/block_docs/attributes/att3.md
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
IALs can refer to element before or after.
|
||||
*** Parameters: ***
|
||||
{}
|
||||
*** Markdown input: ***
|
||||
Paragraph1
|
||||
{:#par1}
|
||||
|
||||
{:#par2}
|
||||
Paragraph2
|
||||
*** Output of inspect ***
|
||||
md_el(:document,[
|
||||
md_par(["Paragraph1"], [[:id, "par1"]]),
|
||||
md_par(["Paragraph2"], [[:id, "par2"]])
|
||||
],{},[])
|
||||
*** Output of to_html ***
|
||||
<p id="par1">Paragraph1</p>
|
||||
|
||||
<p id="par2">Paragraph2</p>
|
||||
*** Output of to_latex ***
|
||||
Paragraph1
|
||||
|
||||
Paragraph2
|
||||
*** Output of to_md ***
|
||||
Paragraph1
|
||||
|
||||
Paragraph2
|
||||
*** Output of to_s ***
|
||||
Paragraph1Paragraph2
|
57
vendor/plugins/maruku/spec/block_docs/attributes/attributes.md
vendored
Normal file
57
vendor/plugins/maruku/spec/block_docs/attributes/attributes.md
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
This is a simple test for attributes
|
||||
*** Parameters: ***
|
||||
{}
|
||||
*** Markdown input: ***
|
||||
|
||||
Header with attributes {#header1}
|
||||
----------------------
|
||||
|
||||
### Header with attributes ### {#header2}
|
||||
|
||||
### Header no attributes ###
|
||||
|
||||
{:warn2}Paragraph with a.
|
||||
{#par1}
|
||||
|
||||
Paragraph with *emphasis*{:hello notfound}
|
||||
{#par2}
|
||||
|
||||
{:hello: .chello}
|
||||
*** Output of inspect ***
|
||||
md_el(:document,[
|
||||
md_el(:header,["Header with attributes"],{:level=>2},[[:id, "header1"]]),
|
||||
md_el(:header,["Header with attributes"],{:level=>3},[[:id, "header2"]]),
|
||||
md_el(:header,["Header no attributes"],{:level=>3},[]),
|
||||
md_par(["Paragraph with a."], [[:id, "par1"]]),
|
||||
md_par([
|
||||
"Paragraph with ",
|
||||
md_em(["emphasis"], [[:ref, "hello"], [:ref, "notfound"]])
|
||||
], [[:id, "par2"]]),
|
||||
md_el(:ald,[],{:ald=>[[:class, "chello"]],:ald_id=>"hello"},[])
|
||||
],{},[])
|
||||
*** Output of to_html ***
|
||||
<h2 id="header1">Header with attributes</h2>
|
||||
|
||||
<h3 id="header2">Header with attributes</h3>
|
||||
|
||||
<h3 id="header_no_attributes_3">Header no attributes</h3>
|
||||
|
||||
<p id="par1">Paragraph with a.</p>
|
||||
|
||||
<p id="par2">Paragraph with <em class="chello">emphasis</em></p>
|
||||
*** Output of to_latex ***
|
||||
\hypertarget{header1}{}\subsection*{{Header with attributes}}\label{header1}
|
||||
|
||||
\hypertarget{header2}{}\subsubsection*{{Header with attributes}}\label{header2}
|
||||
|
||||
\hypertarget{header_no_attributes_3}{}\subsubsection*{{Header no attributes}}\label{header_no_attributes_3}
|
||||
|
||||
Paragraph with a.
|
||||
|
||||
Paragraph with \emph{emphasis}
|
||||
*** Output of to_md ***
|
||||
Header with attributesHeader with attributesHeader no attributesParagraph with a.
|
||||
|
||||
Paragraph with emphasis
|
||||
*** Output of to_s ***
|
||||
Header with attributesHeader with attributesHeader no attributesParagraph with a.Paragraph with emphasis
|
26
vendor/plugins/maruku/spec/block_docs/attributes/circular.md
vendored
Normal file
26
vendor/plugins/maruku/spec/block_docs/attributes/circular.md
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
*** Parameters: ***
|
||||
{}
|
||||
*** Markdown input: ***
|
||||
|
||||
Paragraph
|
||||
{:a}
|
||||
|
||||
|
||||
{:a: b}
|
||||
{:b: a}
|
||||
|
||||
*** Output of inspect ***
|
||||
md_el(:document,[
|
||||
md_par(["Paragraph"], [[:ref, "a"]]),
|
||||
md_el(:ald,[],{:ald=>[[:ref, "b"]],:ald_id=>"a"},[]),
|
||||
md_el(:ald,[],{:ald=>[[:ref, "a"]],:ald_id=>"b"},[])
|
||||
],{},[])
|
||||
*** Output of to_html ***
|
||||
<p>Paragraph</p>
|
||||
*** Output of to_latex ***
|
||||
Paragraph
|
||||
*** Output of to_md ***
|
||||
Paragraph
|
||||
*** Output of to_s ***
|
||||
Paragraph
|
22
vendor/plugins/maruku/spec/block_docs/attributes/default.md
vendored
Normal file
22
vendor/plugins/maruku/spec/block_docs/attributes/default.md
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
This shows the use of default attributes list.
|
||||
*** Parameters: ***
|
||||
{}
|
||||
*** Markdown input: ***
|
||||
Paragraph2
|
||||
{#2}
|
||||
|
||||
{paragraph}: .maruku-par
|
||||
|
||||
*** Output of inspect ***
|
||||
md_el(:document,[
|
||||
md_par(["Paragraph2"], [[:id, "2"]]),
|
||||
md_el(:ald,[],{:ald=>[[:class, "maruku-par"]],:ald_id=>"paragraph"},[])
|
||||
],{},[])
|
||||
*** Output of to_html ***
|
||||
<p id="2" class="maruku-par">Paragraph2</p>
|
||||
*** Output of to_latex ***
|
||||
Paragraph2
|
||||
*** Output of to_md ***
|
||||
Paragraph2
|
||||
*** Output of to_s ***
|
||||
Paragraph2
|
Loading…
Add table
Add a link
Reference in a new issue