Skip to content

Commit 2cf6c5a

Browse files
committed
Fix typo in example
1 parent dfe4fea commit 2cf6c5a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

readme.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,17 @@ To extend the standard schema with a few changes, clone `github.json`
8787
like so:
8888

8989
```js
90-
var h = require('hastscript');
91-
var merge = require('deepmerge');
92-
var gh = require('hast-util-sanitize/lib/github');
90+
var h = require('hastscript')
91+
var merge = require('deepmerge')
92+
var gh = require('hast-util-sanitize/lib/github')
93+
var sanitize = require('hast-util-sanitize')
94+
95+
var schema = merge(gh, {attributes: {'*': ['className']}})
9396

94-
var schema = merge(gh, {attributes: {'*': ['className']}});
97+
var tree = sanitize(h('div', {className: ['foo']}), schema)
9598

96-
var tree = sanitize(h('div', {className: ['foo']}), schema);
9799
// `tree` still has `className`.
100+
console.log(tree)
98101
```
99102

100103
###### `attributes`

0 commit comments

Comments
 (0)