From: Jean-Philippe Lang Date: Tue, 11 Nov 2008 16:26:05 +0000 (+0000) Subject: Less agressive Redcloth lang attribute parsing (#2091). X-Git-Tag: 0.8.0-RC1~77 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=737bbb3d3d67d3c30620c0513c95705705a6eb7a;p=redmine.git Less agressive Redcloth lang attribute parsing (#2091). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2020 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index 220617f14..7898d721f 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -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+)' diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 087d96316..d23300309 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -177,6 +177,7 @@ class ApplicationHelperTest < HelperTestCase '[[onlinestore:Unknown page]]' => 'Unknown page', # striked through link '-[[Another page|Page]]-' => 'Page', + '-[[Another page|Page]] link-' => 'Page link', # escaping '![[Another page|Page]]' => '[[Another page|Page]]', }