You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-23Lines changed: 51 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,34 +171,62 @@ The client parser mimics the server parser by using the [DOM](https://developer.
171
171
172
172
## Options (server only)
173
173
174
-
Because the server parser is a wrapper of [htmlparser2](https://github.com/fb55/htmlparser2), which implements [domhandler](https://github.com/fb55/domhandler), you can alter how the server parser parses your code with the following options:
174
+
Because the server parser is a wrapper of [htmlparser2](https://github.com/fb55/htmlparser2), which implements [domhandler](https://github.com/fb55/domhandler), you can alter how the server parser parses your code with the options:
175
175
176
-
```js
177
-
/**
178
-
* These are the default options being used if you omit the optional options object.
179
-
* htmlparser2 will use the same options object for its domhandler so the options
180
-
* should be combined into a single object like so:
xmlMode:false, // Will overwrite what is used for the domhandler, otherwise inherited.
195
-
decodeEntities:true,
196
-
lowerCaseTags:true, // !xmlMode by default
197
-
lowerCaseAttributeNames:true, // !xmlMode by default
198
-
recognizeCDATA:false, // xmlMode by default
199
-
recognizeSelfClosing:false, // xmlMode by default
200
-
Tokenizer: Tokenizer,
201
-
};
228
+
Tokenizer?:typeofTokenizer;
229
+
}
202
230
```
203
231
204
232
If you're parsing SVG, you can set `lowerCaseTags` to `true` without having to enable `xmlMode`. This will return all tag names in camelCase and not the HTML standard of lowercase.
0 commit comments