summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/redcloth3.rb4
-rw-r--r--test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb6
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb
index 31a558799..0c44346d0 100644
--- a/lib/redcloth3.rb
+++ b/lib/redcloth3.rb
@@ -384,7 +384,7 @@ class RedCloth3 < String
(?!\-\-)
(#{QTAGS_JOIN}|) # oqs
(#{rcq}) # qtag
- (\w|[^\s].*?[^\s]) # content
+ ([[:word:]]|[^\s].*?[^\s]) # content
(?!\-\-)
#{rcq}
(#{QTAGS_JOIN}|) # oqa
@@ -393,7 +393,7 @@ class RedCloth3 < String
/(#{rcq})
(#{C})
(?::(\S+))?
- (\w|[^\s\-].*?[^\s\-])
+ ([[:word:]]|[^\s\-].*?[^\s\-])
#{rcq}/xm
end
[rc, ht, re, rtype]
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 5c7735547..6d816537e 100644
--- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
@@ -1,3 +1,5 @@
+#encoding: utf-8
+#
# Redmine - project management software
# Copyright (C) 2006-2015 Jean-Philippe Lang
#
@@ -59,6 +61,10 @@ class Redmine::WikiFormatting::TextileFormatterTest < ActionView::TestCase
end
end
+ def test_modifier_should_work_with_one_non_ascii_character
+ assert_html_output "*Ä*" => "<strong>Ä</strong>"
+ end
+
def test_styles
# single style
assert_html_output({