Skip to content

Commit f9b165d

Browse files
committed
docs: add description for recognizeNoValueAttribute option
1 parent b992f28 commit f9b165d

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

readme.md

+23-18
Original file line numberDiff line numberDiff line change
@@ -81,45 +81,50 @@ Tag objects can contain three keys. The `tag` key takes the name of the tag as t
8181
## Options
8282

8383
### `directives`
84-
Type: `Array`
85-
Default: `[{name: '!doctype', start: '<', end: '>'}]`
86-
Description: *Adds processing of custom directives. Note: The property ```name``` in custom directives can be ```String``` or ```RegExp``` type*
84+
Type: `Array`
85+
Default: `[{name: '!doctype', start: '<', end: '>'}]`
86+
Description: *Adds processing of custom directives. Note: The property ```name``` in custom directives can be ```String``` or ```RegExp``` type*
8787

8888
### `xmlMode`
89-
Type: `Boolean`
90-
Default: `false`
89+
Type: `Boolean`
90+
Default: `false`
9191
Description: *Indicates whether special tags (`<script>` and `<style>`) should get special treatment and if "empty" tags (eg. `<br>`) can have children. If false, the content of special tags will be text only. For feeds and other XML content (documents that don't consist of HTML), set this to true.*
9292

9393
### `decodeEntities`
94-
Type: `Boolean`
95-
Default: `false`
94+
Type: `Boolean`
95+
Default: `false`
9696
Description: *If set to true, entities within the document will be decoded.*
9797

9898
### `lowerCaseTags`
99-
Type: `Boolean`
100-
Default: `false`
99+
Type: `Boolean`
100+
Default: `false`
101101
Description: *If set to true, all tags will be lowercased. If `xmlMode` is disabled.*
102102

103103
### `lowerCaseAttributeNames`
104-
Type: `Boolean`
105-
Default: `false`
104+
Type: `Boolean`
105+
Default: `false`
106106
Description: *If set to true, all attribute names will be lowercased. This has noticeable impact on speed.*
107107

108108
### `recognizeCDATA`
109-
Type: `Boolean`
110-
Default: `false`
109+
Type: `Boolean`
110+
Default: `false`
111111
Description: *If set to true, CDATA sections will be recognized as text even if the `xmlMode` option is not enabled. NOTE: If `xmlMode` is set to `true` then CDATA sections will always be recognized as text.*
112112

113113
### `recognizeSelfClosing`
114-
Type: `Boolean`
115-
Default: `false`
114+
Type: `Boolean`
115+
Default: `false`
116116
Description: *If set to true, self-closing tags will trigger the `onclosetag` event even if `xmlMode` is not set to `true`. NOTE: If `xmlMode` is set to `true` then self-closing tags will always be recognized.*
117117

118-
### `sourceLocations`
119-
Type: `Boolean`
120-
Default: `false`
118+
### `sourceLocations`
119+
Type: `Boolean`
120+
Default: `false`
121121
Description: *If set to true, AST nodes will have a `location` property containing the `start` and `end` line and column position of the node.*
122122

123+
### `recognizeNoValueAttribute`
124+
Type: `Boolean`
125+
Default: `false`
126+
Description: *If set to true, AST nodes will recognize attribute with no value and mark as `true` which will be correctly rendered by `posthtml-render` package*
127+
123128
## License
124129

125130
[MIT](LICENSE)

0 commit comments

Comments
 (0)