Skip to content

Commit

Permalink
Update docs for unified@9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Mar 30, 2020
1 parent 35e6a2c commit 62c93b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"browserify": "^16.0.0",
"nyc": "^15.0.0",
"prettier": "^2.0.0",
"remark": "^11.0.0",
"remark-cli": "^7.0.0",
"remark": "^12.0.0",
"remark-cli": "^8.0.0",
"remark-preset-wooorm": "^6.0.0",
"tape": "^4.0.0",
"tinyify": "^2.0.0",
Expand Down
7 changes: 6 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ unified()
.use(vdom)
.process('Some _emphasis_, **importance**, and `code`.', function(err, file) {
if (err) throw err
console.dir(file.contents, {depth: null})
console.dir(file.result, {depth: null})
})
```

Expand Down Expand Up @@ -119,6 +119,9 @@ VirtualNode {

Compile Markdown to [Virtual DOM][vdom].

> ℹ️ In [`unified@9.0.0`][unified-9], the result of `.process` changed from
> ~~`file.contents`~~ to `file.result`.
##### `options`

###### `options.sanitize`
Expand Down Expand Up @@ -268,3 +271,5 @@ abide by its terms.
[hint]: https://github.com/Matt-Esch/virtual-dom/tree/master/virtual-hyperscript#key

[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting

[unified-9]: https://github.com/unifiedjs/unified/releases/tag/9.0.0
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var vdom = require('.')

test('remark-vdom', function (t) {
function check(fixture, options) {
return vdom2html(remark().use(vdom, options).processSync(fixture).contents)
return vdom2html(remark().use(vdom, options).processSync(fixture).result)
}

t.equal(
Expand Down Expand Up @@ -62,7 +62,7 @@ test('remark-vdom', function (t) {
)

var node = remark().use(vdom, {prefix: 'f-'}).processSync('_Emphasis_!')
.contents
.result

t.equal(node.key, 'f-1', '`prefix`')

Expand Down

0 comments on commit 62c93b3

Please sign in to comment.