From f914a40fa958b84b1938737d7bb7bf62990dc993 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Sat, 27 Nov 2010 00:43:22 -0600 Subject: [PATCH] Fix Maruku Math Bug Reported by Andrew Stacey. --- test/unit/page_renderer_test.rb | 6 ++++++ vendor/plugins/maruku/lib/maruku/ext/math/parsing.rb | 2 ++ 2 files changed, 8 insertions(+) diff --git a/test/unit/page_renderer_test.rb b/test/unit/page_renderer_test.rb index 530ebc77..506273ff 100644 --- a/test/unit/page_renderer_test.rb +++ b/test/unit/page_renderer_test.rb @@ -208,6 +208,12 @@ END_THM %{sin(x)

}, "ecuasi\303\263n $\\sin(x)$") + assert_markup_parsed_as( + %{
p\\cdot\np
}, + "$$\\cdot\np$$") + end def test_ial_in_lists diff --git a/vendor/plugins/maruku/lib/maruku/ext/math/parsing.rb b/vendor/plugins/maruku/lib/maruku/ext/math/parsing.rb index f7460d34..2aaf7efc 100644 --- a/vendor/plugins/maruku/lib/maruku/ext/math/parsing.rb +++ b/vendor/plugins/maruku/lib/maruku/ext/math/parsing.rb @@ -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