summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-07-21 00:17:51 +0000
committerGo MAEDA <maeda@farend.jp>2018-07-21 00:17:51 +0000
commit375c7adfe41e04286c4943ec0eda50c486738beb (patch)
treefc23e3b7b207001bae8af3ac154c6a4380cae925
parentbfb582ebb7768b3ebd1119e9706615bd972f8a76 (diff)
downloadredmine-375c7adfe41e04286c4943ec0eda50c486738beb.tar.gz
redmine-375c7adfe41e04286c4943ec0eda50c486738beb.zip
Merged r17450 from trunk to 3.4-stable (#29247).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17451 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/wiki_formatting/textile/redcloth3.rb2
-rw-r--r--test/unit/lib/redmine/wiki_formatting/macros_test.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb
index 7ed29bbd8..2ac134c0a 100644
--- a/lib/redmine/wiki_formatting/textile/redcloth3.rb
+++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb
@@ -343,7 +343,7 @@ class RedCloth3 < String
A_VLGN = /[\-^~]/
C_CLAS = '(?:\([^")]+\))'
C_LNGE = '(?:\[[a-z\-_]+\])'
- C_STYL = '(?:\{[^"}]+\})'
+ 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/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb
index 8b6f44974..a1d79c164 100644
--- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb
@@ -401,4 +401,9 @@ EXPECTED
assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(text).gsub(%r{[\r\n\t]}, '')
end
+
+ def test_macro_should_support_phrase_modifiers
+ text = "*{{hello_world}}*"
+ assert_match %r|\A<p><strong>Hello world!.*</strong></p>\z|, textilizable(text)
+ end
end