]> source.dussan.org Git - redmine.git/commitdiff
Less agressive Redcloth lang attribute parsing (#2091).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 11 Nov 2008 16:26:05 +0000 (16:26 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 11 Nov 2008 16:26:05 +0000 (16:26 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2020 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redcloth3.rb
test/unit/helpers/application_helper_test.rb

index 220617f14615038d62f0b60fb614fc9d3e29601f..7898d721fe854adf0c5ec5cff049234a11426f05 100644 (file)
@@ -341,7 +341,7 @@ class RedCloth3 < String
     A_HLGN = /(?:(?:<>|<|>|\=|[()]+)+)/
     A_VLGN = /[\-^~]/
     C_CLAS = '(?:\([^)]+\))'
-    C_LNGE = '(?:\[[^\]]+\])'
+    C_LNGE = '(?:\[[^\[\]]+\])'
     C_STYL = '(?:\{[^}]+\})'
     S_CSPN = '(?:\\\\\d+)'
     S_RSPN = '(?:/\d+)'
index 087d96316f1b98619909a0a82553a170f588ea3d..d233003096fe66586e2cb0a00f70c7751fb359c7 100644 (file)
@@ -177,6 +177,7 @@ class ApplicationHelperTest < HelperTestCase
       '[[onlinestore:Unknown page]]' => '<a href="/wiki/onlinestore/Unknown_page" class="wiki-page new">Unknown page</a>',
       # striked through link
       '-[[Another page|Page]]-' => '<del><a href="/wiki/ecookbook/Another_page" class="wiki-page">Page</a></del>',
+      '-[[Another page|Page]] link-' => '<del><a href="/wiki/ecookbook/Another_page" class="wiki-page">Page</a> link</del>',
       # escaping
       '![[Another page|Page]]' => '[[Another page|Page]]',
     }