Project

General

Profile

Defect #29247 ยป 29247.patch

Added a test to Stephan Wenzel's patch - Go MAEDA, 2018-07-19 02:48

View differences:

lib/redmine/wiki_formatting/textile/redcloth3.rb
343 343
    A_VLGN = /[\-^~]/
344 344
    C_CLAS = '(?:\([^")]+\))'
345 345
    C_LNGE = '(?:\[[a-z\-_]+\])'
346
    C_STYL = '(?:\{[^"}]+\})'
346
    C_STYL = '(?:\{[^{][^"}]+\})'
347 347
    S_CSPN = '(?:\\\\\d+)'
348 348
    S_RSPN = '(?:/\d+)'
349 349
    A = "(?:#{A_HLGN}?#{A_VLGN}?|#{A_VLGN}?#{A_HLGN}?)"
test/unit/lib/redmine/wiki_formatting/macros_test.rb
401 401

  
402 402
    assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(text).gsub(%r{[\r\n\t]}, '')
403 403
  end
404

  
405
  def test_macro_should_support_phrase_modifiers
406
    text = "*{{hello_world}}*"
407
    assert_match %r|\A<p><strong>Hello world!.*</strong></p>\z|, textilizable(text)
408
  end
404 409
end
    (1-1/1)