0009-Fixes-Layout-HeredocIndentation-Use-2-spaces-for-ind.patch

Marius BALTEANU, 2021-07-04 12:21

Download (1.72 KB)

View differences:

test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb
134 134
    end
135 135

  
136 136
    def test_footnotes
137
      text = <<-STR
138
  This is some text[^1].
139
  
140
  [^1]: This is the foot note
137
      text = <<~STR
138
        This is some text[^1].
139

  
140
        [^1]: This is the foot note
141 141
      STR
142 142

  
143
      expected = <<-EXPECTED
144
  <p>This is some text<sup><a href="#fn1" id="fnref1">1</a></sup>.</p>
145
   <ol>
146
  <li id="fn1">
147
  <p>This is the foot note <a href="#fnref1">↩</a></p>
148
  </li>
149
  </ol>
143
      expected = <<~EXPECTED
144
        <p>This is some text<sup><a href="#fn1" id="fnref1">1</a></sup>.</p>
145
         <ol>
146
        <li id="fn1">
147
        <p>This is the foot note <a href="#fnref1">↩</a></p>
148
        </li>
149
        </ol>
150 150
      EXPECTED
151 151

  
152 152
      assert_equal expected.gsub(%r{[\r\n\t]}, ''), format(text).gsub(%r{[\r\n\t]}, '')
153
-