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.
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:
truethen self-closing tags will result in the tag being closed even ifxmlModeis not set totruetruethen CDATA text will result in theontextevent being fired even ifxmlModeis not set totrueIn theory,
xmlModecould be used as a way to control the more fine-grained options, but I wanted to minimize code change.