From 09356f4e67bb8b56d324758c35e987daf5895587 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 6 Jun 2015 07:15:55 +0000 Subject: [PATCH] Can't apply textile modifiers to 1 non-ASCII character (#19995). git-svn-id: http://svn.redmine.org/redmine/trunk@14295 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redcloth3.rb | 4 ++-- .../lib/redmine/wiki_formatting/textile_formatter_test.rb | 6 ++++++ 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 "*Ä*" => "Ä" + end + def test_styles # single style assert_html_output({ -- 2.39.5