File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -91,10 +91,20 @@ Sanitize the given [HAST][] tree.
91
91
### ` Schema `
92
92
93
93
Configuration. If not given, defaults to [ GitHub] [ ] style sanitation.
94
- If any key isn’t given, it defaults to GH’s style too.
94
+ If any top-level key isn’t given, it defaults to GH’s style too.
95
95
96
96
For a thorough sample, see the packages [ ` github.json ` ] [ schema-github ] .
97
97
98
+ To extend the the standard schema with a few changes, clone ` github.json `
99
+ like so:
100
+
101
+ ``` js
102
+ var clone = require (' clone' );
103
+ var base = require (' hast-util-sanitize/lib/github.json' );
104
+ var schema = clone (base);
105
+ schema .attributes [' *' ].push (' className' );
106
+ ```
107
+
98
108
###### ` attributes `
99
109
100
110
Map of tag-names to allowed attributes (` Object.<Array.<string>> ` ).
You can’t perform that action at this time.
0 commit comments