Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
8b36dad71c
|
@ -1,3 +1,6 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
# encoding: UTF-8
|
||||||
|
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
||||||
|
|
||||||
class PageRendererTest < ActiveSupport::TestCase
|
class PageRendererTest < ActiveSupport::TestCase
|
||||||
|
@ -156,7 +159,7 @@ END_THM
|
||||||
%{xmlns='http://www.w3.org/1998/Math/MathML'><mi>sin</mi><mo stretchy='false'>} +
|
%{xmlns='http://www.w3.org/1998/Math/MathML'><mi>sin</mi><mo stretchy='false'>} +
|
||||||
%{(</mo><mi>x</mi><mo stretchy='false'>)</mo><semantics><annotation-xml encoding='SVG1.1'>} +
|
%{(</mo><mi>x</mi><mo stretchy='false'>)</mo><semantics><annotation-xml encoding='SVG1.1'>} +
|
||||||
%{<svg/></annotation-xml></semantics></math><span class='maruku-eq-tex'><code style='display: none;'>} +
|
%{<svg/></annotation-xml></semantics></math><span class='maruku-eq-tex'><code style='display: none;'>} +
|
||||||
%{\\sin(x) \\begin{svg}<svg/>\\end{svg}</code></span></div>},
|
%{\\sin(x) \\begin{svg}<svg/>\\end{svg}</code></span></div>},
|
||||||
"$$\\sin(x) \\begin{svg}<svg/>\\end{svg}$$")
|
"$$\\sin(x) \\begin{svg}<svg/>\\end{svg}$$")
|
||||||
|
|
||||||
code_block = [
|
code_block = [
|
||||||
|
@ -228,13 +231,13 @@ END_THM
|
||||||
re = Regexp.new(
|
re = Regexp.new(
|
||||||
%{<p>equation <span class='maruku-inline'><img alt='\\$a\\\\sin\\(\\\\theta\\)\\$' } +
|
%{<p>equation <span class='maruku-inline'><img alt='\\$a\\\\sin\\(\\\\theta\\)\\$' } +
|
||||||
%{class='maruku-png' src='\.\./files/pngs/\\w+\.png' style='vertical-align: -0\.5} +
|
%{class='maruku-png' src='\.\./files/pngs/\\w+\.png' style='vertical-align: -0\.5} +
|
||||||
%{55555555555556ex; height: 2\.22222222222222ex;'/></span></p>})
|
%{55555555555556ex; height: 2\.33333333333333ex;'/></span></p>})
|
||||||
assert_match_markup_parsed_as(re, 'equation $a\sin(\theta)$')
|
assert_match_markup_parsed_as(re, 'equation $a\sin(\theta)$')
|
||||||
|
|
||||||
re = Regexp.new(
|
re = Regexp.new(
|
||||||
%{<div class='maruku-equation'><img alt='\\$a\\\\sin\\(\\\\theta\\)\\$' } +
|
%{<div class='maruku-equation'><img alt='\\$a\\\\sin\\(\\\\theta\\)\\$' } +
|
||||||
%{class='maruku-png' src='\.\./files/pngs/\\w+\.png' style='height: 2\.22222222} +
|
%{class='maruku-png' src='\.\./files/pngs/\\w+\.png' style='height: 2\.333333333} +
|
||||||
%{222222ex;'/><span class='maruku-eq-tex'><code style='display: none;'>a\\\\sin} +
|
%{33333ex;'/><span class='maruku-eq-tex'><code style='display: none;'>a\\\\sin} +
|
||||||
%{\\(\\\\theta\\)<\/code><\/span><\/div>})
|
%{\\(\\\\theta\\)<\/code><\/span><\/div>})
|
||||||
assert_match_markup_parsed_as(re, '$$a\sin(\theta)$$')
|
assert_match_markup_parsed_as(re, '$$a\sin(\theta)$$')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue