Sha256: 0c98684bd3a5983433287ce320c5fc908e55c547db0da838631a39bfa71a355d

Contents?: true

Size: 1.91 KB

Versions: 5

Compression:

Stored size: 1.91 KB

Contents

require "test_helper"
require "govspeak_test_helper"

class GovspeakFootnoteTest < Minitest::Test
  include GovspeakTestHelper

  test_given_govspeak "
    Footnotes can be added[^1].

    [^1]: And then later defined.

    Footnotes can be added too[^2].

    [^2]: And then later defined too.

    This footnote has a reference number[^3].

    And this footnote has the same reference number[^3].

    [^3]: And then they both point here." do
    assert_html_output(
      %(
      <p>Footnotes can be added<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote">[footnote 1]</a></sup>.</p>

      <p>Footnotes can be added too<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote">[footnote 2]</a></sup>.</p>

      <p>This footnote has a reference number<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote">[footnote 3]</a></sup>.</p>

      <p>And this footnote has the same reference number<sup id="fnref:3:1" role="doc-noteref"><a href="#fn:3" class="footnote">[footnote 3]</a></sup>.</p>

      <div class="footnotes" role="doc-endnotes">
        <ol>
          <li id="fn:1" role="doc-endnote">
            <p>And then later defined. <a href="#fnref:1" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a></p>
          </li>
          <li id="fn:2" role="doc-endnote">
            <p>And then later defined too. <a href="#fnref:2" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a></p>
          </li>
          <li id="fn:3" role="doc-endnote">
            <p>And then they both point here. <a href="#fnref:3" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a> <a href="#fnref:3:1" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced 2">↩<sup>2</sup></a></p>
          </li>
        </ol>
      </div>),
    )
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
govspeak-6.7.0 test/govspeak_footnote_test.rb
govspeak-6.6.0 test/govspeak_footnote_test.rb
govspeak-6.5.11 test/govspeak_footnote_test.rb
govspeak-6.5.10 test/govspeak_footnote_test.rb
govspeak-6.5.9 test/govspeak_footnote_test.rb