rehype-parse
Advanced tools
Comparing version 6.0.2 to 7.0.0
@@ -5,3 +5,2 @@ 'use strict' | ||
var Parser5 = require('parse5/lib/parser') | ||
var xtend = require('xtend') | ||
var errors = require('./errors.json') | ||
@@ -16,3 +15,3 @@ | ||
function parse(options) { | ||
var settings = xtend(options, this.data('settings')) | ||
var settings = Object.assign({}, options, this.data('settings')) | ||
var position = settings.position | ||
@@ -79,6 +78,3 @@ | ||
function encodedChar() { | ||
var char = doc | ||
.charCodeAt(err.startOffset) | ||
.toString(16) | ||
.toUpperCase() | ||
var char = doc.charCodeAt(err.startOffset).toString(16).toUpperCase() | ||
@@ -85,0 +81,0 @@ return '0x' + char |
{ | ||
"name": "rehype-parse", | ||
"version": "6.0.2", | ||
"description": "HTML parser for rehype", | ||
"version": "7.0.0", | ||
"description": "rehype plugin to parse HTML", | ||
"license": "MIT", | ||
"keywords": [ | ||
"unified", | ||
"rehype", | ||
"rehype-plugin", | ||
"plugin", | ||
"html", | ||
@@ -27,10 +31,11 @@ "abstract", | ||
"index.js", | ||
"types/index.d.ts", | ||
"errors.json" | ||
], | ||
"types": "types/index.d.ts", | ||
"dependencies": { | ||
"hast-util-from-parse5": "^5.0.0", | ||
"parse5": "^5.0.0", | ||
"xtend": "^4.0.0" | ||
"hast-util-from-parse5": "^6.0.0", | ||
"parse5": "^6.0.0" | ||
}, | ||
"xo": false | ||
} |
@@ -27,5 +27,5 @@ # rehype-parse | ||
<td width="20%" align="center"> | ||
<a href="https://zeit.co"><img src="https://avatars1.githubusercontent.com/u/14985020?s=400&v=4"></a> | ||
<a href="https://vercel.com"><img src="https://avatars1.githubusercontent.com/u/14985020?s=400&v=4"></a> | ||
<br><br>π₯ | ||
<a href="https://zeit.co">ZEIT</a> | ||
<a href="https://vercel.com">Vercel</a> | ||
</td> | ||
@@ -69,3 +69,3 @@ <td width="20%" align="center"> | ||
Then we transform HTML to Markdown with [`rehype-remark`][rehype-remark] and | ||
finally compile that Markdown with [`remark-stringify`][remark-stringify]. | ||
finally serialize that Markdown with [`remark-stringify`][remark-stringify]. | ||
@@ -139,3 +139,3 @@ Say we have the following file, `example.html`, with a few errors: | ||
If an `svg` element is found in the HTML space, `stringify` automatically | ||
If an `svg` element is found in the HTML space, `parse` automatically | ||
switches to the SVG space when [**entering**][enter] the element, and switches | ||
@@ -274,4 +274,4 @@ back when [**exiting**][exit]. | ||
This project has a [Code of Conduct][coc]. | ||
By interacting with this repository, organisation, or community you agree to | ||
This project has a [code of conduct][coc]. | ||
By interacting with this repository, organization, or community you agree to | ||
abide by its terms. | ||
@@ -307,3 +307,3 @@ | ||
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg | ||
[chat-badge]: https://img.shields.io/badge/chat-spectrum-7b16ff.svg | ||
@@ -310,0 +310,0 @@ [chat]: https://spectrum.chat/unified/rehype |
41674
2
5
366
+ Added@types/hast@2.3.10(transitive)
+ Added@types/parse5@5.0.3(transitive)
+ Added@types/unist@2.0.10(transitive)
+ Addedhast-util-from-parse5@6.0.1(transitive)
+ Addedhastscript@6.0.0(transitive)
+ Addedis-buffer@2.0.5(transitive)
+ Addedparse5@6.0.1(transitive)
+ Addedunist-util-stringify-position@2.0.3(transitive)
+ Addedvfile@4.2.1(transitive)
+ Addedvfile-location@3.2.0(transitive)
+ Addedvfile-message@2.0.4(transitive)
- Removedxtend@^4.0.0
- Removedccount@1.1.0(transitive)
- Removedhast-util-from-parse5@5.0.3(transitive)
- Removedhastscript@5.1.2(transitive)
- Removedparse5@5.1.1(transitive)
Updatedhast-util-from-parse5@^6.0.0
Updatedparse5@^6.0.0