We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24fc81f commit 5c575aeCopy full SHA for 5c575ae
readme.md
@@ -99,10 +99,14 @@ To extend 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');
+var h = require('hastscript');
+var merge = require('deepmerge');
+var gh = require('hast-util-sanitize/lib/github');
+
106
+var schema = merge(gh, {attributes: {'*': ['className']}});
107
108
+var tree = sanitize(h('div', {className: ['foo']}));
109
+// `tree` still has `className`.
110
```
111
112
###### `attributes`
0 commit comments