From 533590c29cf3d22cd95975ad6d61c2c1bf70235d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 20 Mar 2010 12:54:23 +0000 Subject: [PATCH] Fixed: Double-dash results in strikethrough text (#5122). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3605 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redcloth3.rb | 2 ++ .../lib/redmine/wiki_formatting/textile_formatter_test.rb | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index fb9691631..045d44f5d 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 a64690d36..d5fbd72ce 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)