Sha256: e0ce3e5fe7851f510f715379d4136c42b310dc775b0ddb26b885b6bbe8f9e216

Contents?: true

Size: 244 Bytes

Versions: 12

Compression:

Stored size: 244 Bytes

Contents

# Moves IDs on headings to their parent section
Nanoc::Filter.define(:scholar_headerids_to_section) do |content|
  content = content.dup
  content.gsub! /<section>(\s*)(<h\d[^>]*)(\sid=[^\s>]+)/,
                '<section\3>\1\2'
  content
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
scholarmarkdown-2.5.0 lib/scholarmarkdown/filter/headerids_to_section.rb
scholarmarkdown-2.4.0 lib/scholarmarkdown/filter/headerids_to_section.rb
scholarmarkdown-2.3.0 lib/scholarmarkdown/filter/headerids_to_section.rb
scholarmarkdown-2.2.0 lib/scholarmarkdown/filter/headerids_to_section.rb
scholarmarkdown-2.1.0 lib/scholarmarkdown/filter/headerids_to_section.rb
scholarmarkdown-2.0.0 lib/scholarmarkdown/filter/headerids_to_section.rb
scholarmarkdown-1.4.0 lib/scholarmarkdown/filter/headerids_to_section.rb
scholarmarkdown-1.3.1 lib/scholarmarkdown/filter/headerids_to_section.rb
scholarmarkdown-1.3.0 lib/scholarmarkdown/filter/headerids_to_section.rb
scholarmarkdown-1.2.0 lib/scholarmarkdown/filter/headerids_to_section.rb
scholarmarkdown-1.1.0 lib/scholarmarkdown/filter/headerids_to_section.rb
scholarmarkdown-1.0.0 lib/scholarmarkdown/filter/headerids_to_section.rb