Skip to content

Feature request: Ability to handle self-closing tags and CDATA in non-XML mode #73

@patrick-steele-idem

Description

@patrick-steele-idem

For my use case I needed support for a hybrid parser that would allow for XML constructs to be recognized in HTML code. After looking at the source code I felt that adding more options could provide more fine-grained control over parsing without adding too much complexity to the code. Please review my Pull Request which added two new options:

  • recognizeSelfClosing: If set to true then self-closing tags will result in the tag being closed even if xmlMode is not set to true
  • recognizeCDATA: If set to true then CDATA text will result in the ontext event being fired even if xmlMode is not set to true

In theory, xmlMode could be used as a way to control the more fine-grained options, but I wanted to minimize code change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions