Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(readme): add missing parse options #273

Merged
merged 1 commit into from May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions README.md
Expand Up @@ -81,15 +81,17 @@ Parse the data provided, and return the root of the generated DOM.

```js
{
lowerCaseTagName: false, // convert tag name to lower case (hurts performance heavily)
comment: false, // retrieve comments (hurts performance slightly)
voidTag:{
lowerCaseTagName: false, // convert tag name to lower case (hurts performance heavily)
comment: false, // retrieve comments (hurts performance slightly)
fixNestedATags: false, // fix invalid nested <a> HTML tags
parseNoneClosedTags: false, // close none closed HTML tags instead of removing them
voidTag: {
tags: ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr'], // optional and case insensitive, default value is ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr']
closingSlash: true // optional, default false. void tag serialisation, add a final slash <br/>
closingSlash: true // optional, default false. void tag serialisation, add a final slash <br/>
},
blockTextElements: {
script: true, // keep text content when parsing
noscript: true, // keep text content when parsing
script: true, // keep text content when parsing
noscript: true, // keep text content when parsing
style: true, // keep text content when parsing
pre: true // keep text content when parsing
}
Expand Down