Skip to content

Commit

Permalink
Merge pull request #273 from pmilanowicz-finder/patch-1
Browse files Browse the repository at this point in the history
docs(readme): add missing parse options
  • Loading branch information
taoqf authored May 10, 2024
2 parents 29c0ac0 + f747bad commit 4becf0e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
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

0 comments on commit 4becf0e

Please sign in to comment.