1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-09 17:11:32 +00:00

Fix: Textile phrase modifiers break wiki macros (#29247).

Patch by Stephan Wenzel.


git-svn-id: http://svn.redmine.org/redmine/trunk@17450 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2018-07-21 00:16:27 +00:00
parent 8b0d9cce92
commit 26f4b5181f
2 changed files with 6 additions and 1 deletions

View File

@ -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}?)"

View File

@ -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