Sha256: 71ee3de09db7cbc6d53f90234855b2123dd4ae7ddbadb4997abd5f03093d6098

Contents?: true

Size: 339 Bytes

Versions: 25

Compression:

Stored size: 339 Bytes

Contents

# Moves the references section into <footer>
Nanoc::Filter.define(:scholar_references_to_footer) do |content|
  content = content.dup
  references = content[%r{<h2 id="references">.*?</dl>}m]
  if references
    content[references] = ''
    content['</footer>'] = "<section>\n" + references + "\n</section>\n</footer>"
  end
  content
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
scholarmarkdown-3.3.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-3.2.1 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-3.2.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-3.1.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-3.0.1 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-3.0.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.11.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.10.1 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.10.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.9.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.8.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.7.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.6.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.5.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.4.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.3.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.2.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.1.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-2.0.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-1.4.0 lib/scholarmarkdown/filter/references_to_footer.rb