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-1.3.1 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-1.3.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-1.2.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-1.1.0 lib/scholarmarkdown/filter/references_to_footer.rb
scholarmarkdown-1.0.0 lib/scholarmarkdown/filter/references_to_footer.rb