gjtorikian / html-pipeline

HTML processing filters and utilities
MIT License
2.27k stars 382 forks source link

Update toc_filter.rb #278

Closed joelterry closed 3 years ago

joelterry commented 7 years ago

Replace sequences of punctuation/spaces in one sweep rather than delete punctuation, and then replace spaces. As it stands, "Foo&Bar" becomes "foobar" and "Foo & Bar" becomes "foo--bar".

gjtorikian commented 7 years ago

Could you add a test for this please?