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.
9191### ` Schema `
9292
9393Configuration. 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.
9595
9696For a thorough sample, see the packages [ ` github.json ` ] [ schema-github ] .
9797
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+
98108###### ` attributes `
99109
100110Map of tag-names to allowed attributes (` Object.<Array.<string>> ` ).
You can’t perform that action at this time.
0 commit comments