This plugin uses Regex to parse the content and extract headings. I think it would be neat to use the tag processor API instead for the following reasons.
- More robust than parsing HTML with regex.
- Allows us to easily manipulate the elements to add attributes. Currently we replace the whole tag with a new tag we've constructed - the problem doing this is that unsupported attributes aren't re-applied. I patched this for styles... but there could be others.