diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index fb969163..045d44f5 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -381,9 +381,11 @@ class RedCloth3 < String case rtype when :limit /(^|[>\s\(]) # sta + (?!\-\-) (#{QTAGS_JOIN}|) # oqs (#{rcq}) # qtag (\w|[^\s].*?[^\s]) # content + (?!\-\-) #{rcq} (#{QTAGS_JOIN}|) # oqa (?=[[:punct:]]|\s|\)|$)/x 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 a64690d3..d5fbd72c 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb @@ -71,6 +71,13 @@ class Redmine::WikiFormatting::TextileFormatterTest < HelperTestCase ) end + def test_double_dashes_should_not_strikethrough + assert_html_output( + 'double -- dashes -- test' => 'double -- dashes -- test', + 'double -- *dashes* -- test' => 'double -- dashes -- test' + ) + end + private def assert_html_output(to_test)