diff --git a/test/fixtures/revisions.yml b/test/fixtures/revisions.yml index d65c2bd2..48bf2cfd 100644 --- a/test/fixtures/revisions.yml +++ b/test/fixtures/revisions.yml @@ -50,7 +50,7 @@ home_page_second_revision: updated_at: <%= Time.local(2004, 4, 4, 16, 50).to_formatted_s(:db) %> revised_at: <%= Time.local(2004, 4, 4, 16, 50).to_formatted_s(:db) %> page_id: 1 - content: HisWay would be MyWay in kinda ThatWay in HisWay though MyWay \OverThere -- see SmartEngine in that SmartEngineGUI + content: HisWay would be MyWay $\sin(x)\begin{svg}\end{svg}$ in kinda ThatWay in HisWay though MyWay \OverThere -- see SmartEngine in that SmartEngineGUI author: DavidHeinemeierHansson first_page_first_revision: @@ -59,7 +59,7 @@ first_page_first_revision: updated_at: <%= Time.local(2004, 4, 4, 16, 55).to_formatted_s(:db) %> revised_at: <%= Time.local(2004, 4, 4, 16, 55).to_formatted_s(:db) %> page_id: 6 - content: HisWay would be MyWay in kinda ThatWay in HisWay though MyWay \\OverThere -- see SmartEngine in that SmartEngineGUI + content: HisWay would be MyWay $\sin(x)\begin{svg}\end{svg}$ in kinda ThatWay in HisWay though MyWay \\OverThere -- see SmartEngine in that SmartEngineGUI author: DavidHeinemeierHansson oak_first_revision: diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 2ba37c92..c434c942 100755 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -702,7 +702,6 @@ class WikiControllerTest < Test::Unit::TestCase % Because of conflicts, \space and \mathop are converted to % \itexspace and \operatorname during preprocessing. -% \over is simply unsupported. % itex: \space{ht}{dp}{wd} % @@ -868,7 +867,7 @@ class WikiControllerTest < Test::Unit::TestCase \section*{HomePage} -HisWay would be MyWay in kinda ThatWay in HisWay though MyWay $\backslash$OverThere --{} see SmartEngine in that SmartEngineGUI +HisWay would be MyWay $\sin(x) $ in kinda ThatWay in HisWay though MyWay $\backslash$OverThere --{} see SmartEngine in that SmartEngineGUI diff --git a/test/unit/page_renderer_test.rb b/test/unit/page_renderer_test.rb index 6dfc5fde..2b39d69c 100644 --- a/test/unit/page_renderer_test.rb +++ b/test/unit/page_renderer_test.rb @@ -66,6 +66,16 @@ class PageRendererTest < Test::Unit::TestCase %{Smart Engine GUI?

}, "#My Headline#\n\nthat SmartEngineGUI") + assert_markup_parsed_as( + %{ecuasi\303\263n } + + %{sin(x)}, + "ecuasi\303\263n $\\sin(x)$") + + assert_markup_parsed_as( + %{ecuasi\303\263n } + + %{sin(x)}, + "$$\\sin(x) \\begin{svg}\\end{svg}$$") + code_block = [ 'This is a code block:', '', diff --git a/vendor/plugins/maruku/lib/maruku/ext/math/latex_fix.rb b/vendor/plugins/maruku/lib/maruku/ext/math/latex_fix.rb index 166fa519..c0d45e32 100644 --- a/vendor/plugins/maruku/lib/maruku/ext/math/latex_fix.rb +++ b/vendor/plugins/maruku/lib/maruku/ext/math/latex_fix.rb @@ -3,7 +3,7 @@ class String def fix_latex if #{html_math_engine} == 'itex2mml' s = self.gsub("\\mathop{", "\\operatorname{") - s.gsub!(/\\begin{svg}.*?\\end{svg}/m, " ") + s.gsub!(/\\begin\{svg\}.*?\\end\{svg\}/m, " ") s.gsub("\\space{", "\\itexspace{") else self