diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index e159708..f6333b3 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -340,9 +340,9 @@ class RedCloth3 < String # A_HLGN = /(?:(?:<>|<|>|\=|[()]+)+)/ A_VLGN = /[\-^~]/ - C_CLAS = '(?:\([^)]+\))' - C_LNGE = '(?:\[[^\[\]]+\])' - C_STYL = '(?:\{[^}]+\})' + C_CLAS = '(?:\([^")]+\))' + C_LNGE = '(?:\[[^"\[\]]+\])' + C_STYL = '(?:\{[^"}]+\})' S_CSPN = '(?:\\\\\d+)' S_RSPN = '(?:/\d+)' A = "(?:#{A_HLGN}?#{A_VLGN}?|#{A_VLGN}?#{A_HLGN}?)" diff --git a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb index ce4feb6..4253b71 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb @@ -99,7 +99,7 @@ class Redmine::WikiFormatting::TextileFormatterTest < ActionView::TestCase 'p{color:(red)}. text' => '
text
', 'p{color:red;invalid:blue}. text' => 'text
', 'p{invalid:blue;color:red}. text' => 'text
', - 'p{color:"}. text' => 'text
', + 'p{color:"}. text' => 'p{color:"}. text
', }, false) end