Fix Maruku Math Bug

Reported by Andrew Stacey.
master
Jacques Distler 2010-11-27 00:43:22 -06:00
parent cd674bbb36
commit f914a40fa9
2 changed files with 8 additions and 0 deletions

View File

@ -208,6 +208,12 @@ END_THM
%{<mi>sin</mi><mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo></math></p>},
"ecuasi\303\263n $\\sin(x)$")
assert_markup_parsed_as(
%{<div class='maruku-equation'><math class='maruku-mathml' display='block' xmlns='http://w} +
%{ww.w3.org/1998/Math/MathML'><mo>⋅</mo><mi>p</mi></math><span class='maruku-eq-tex'><code} +
%{ style='display: none;'>\\cdot\np</code></span></div>},
"$$\\cdot\np$$")
end
def test_ial_in_lists

View File

@ -58,6 +58,8 @@ MaRuKu::In::Markdown.register_block_extension(
end
opening, tex = first.scan(EquationStart).first
# ensure newline at end of first line of equation isn't swallowed
tex << "\n"
numerate = doc.get_setting(:math_numbered).include?(opening)
label = nil
loop do