fix-29756-v2.diff

Go MAEDA, 2018-10-15 17:30

Download (1.21 KB)

View differences:

lib/redmine/wiki_formatting/textile/redcloth3.rb (working copy)
1034 1034
    def flush_left( text )
1035 1035
        indt = 0
1036 1036
        if text =~ /^ /
1037
            while text !~ /^ {#{indt}}\S/
1037
            while text !~ /^ {#{indt}}[^ ]/
1038 1038
                indt += 1
1039 1039
            end unless text.empty?
1040 1040
            if indt.nonzero?
test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb (working copy)
599 599
    assert_equal expected.gsub(%r{[\r\n\t]}, ''), to_html(text).gsub(%r{[\r\n\t]}, '')
600 600
  end
601 601

  
602
  # TODO: Remove this test after migrating to RedCloth 4
603
  def test_should_not_crash_with_special_input
604
    assert_nothing_raised { to_html(" \f") }
605
    assert_nothing_raised { to_html(" \v") }
606
  end
607

  
602 608
  private
603 609

  
604 610
  def assert_html_output(to_test, expect_paragraph = true)