diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2021-08-15 21:00:16 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2021-08-15 21:00:16 +0000 |
commit | b7798e6e1c0c5db75b20a83a6ba4a96f83052392 (patch) | |
tree | 10c2d0bc89a404d43f38a41080ab9475241a2df1 /test/helpers | |
parent | 5699253da6330447f7a7d3b4cf8a238f9d4608cf (diff) | |
download | redmine-b7798e6e1c0c5db75b20a83a6ba4a96f83052392.tar.gz redmine-b7798e6e1c0c5db75b20a83a6ba4a96f83052392.zip |
Unify code block and add "data-language" attribute with the user-supplied language for Textile and Markdown formaters (#35104).
Patch by Martin Cizek.
git-svn-id: http://svn.redmine.org/redmine/trunk@21183 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/helpers')
-rw-r--r-- | test/helpers/application_helper_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index f918f51d1..06dd04b6a 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -1328,7 +1328,7 @@ class ApplicationHelperTest < Redmine::HelperTest </code></pre> RAW expected = <<~EXPECTED - <pre><code class="ECMA_script syntaxhl"><span class="cm">/* Hello */</span><span class="nb">document</span><span class="p">.</span><span class="nx">write</span><span class="p">(</span><span class="dl">"</span><span class="s2">Hello World!</span><span class="dl">"</span><span class="p">);</span></code></pre> + <pre><code class="ECMA_script syntaxhl" data-language=\"ECMA_script\"><span class="cm">/* Hello */</span><span class="nb">document</span><span class="p">.</span><span class="nx">write</span><span class="p">(</span><span class="dl">"</span><span class="s2">Hello World!</span><span class="dl">"</span><span class="p">);</span></code></pre> EXPECTED assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') end @@ -1340,7 +1340,7 @@ class ApplicationHelperTest < Redmine::HelperTest </code></pre> RAW expected = <<~EXPECTED - <pre><code class=\"ruby syntaxhl\"><span class=\"n\">x</span> <span class=\"o\">=</span> <span class=\"n\">a</span> <span class=\"o\">&</span> <span class=\"n\">b</span></code></pre> + <pre><code class=\"ruby syntaxhl\" data-language=\"ruby\"><span class=\"n\">x</span> <span class=\"o\">=</span> <span class=\"n\">a</span> <span class=\"o\">&</span> <span class=\"n\">b</span></code></pre> EXPECTED with_settings :text_formatting => 'textile' do assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') |