Module: Reacco::Filters::HeadingID
- Included in:
- Readme
- Defined in:
- lib/reacco/filters/headingid.rb
Instance Method Summary collapse
Instance Method Details
#heading_id(html) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/reacco/filters/headingid.rb', line 4 def heading_id(html) html.css('h1, h2, h3').each do |h| h['id'] = slugify(h.content) end html end |