Skip to content

Use WP HTML Tag processor instead of regex #10

@mattheu

Description

@mattheu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions