diff --git a/package.json b/package.json
index e98f1fa5..b0e29c5b 100644
--- a/package.json
+++ b/package.json
@@ -10,19 +10,20 @@
},
"type": "module",
"devDependencies": {
- "bail": "^1.0.0",
+ "bail": "^2.0.0",
"c8": "^7.0.0",
"dtslint": "^4.0.0",
- "hast-util-assert": "^2.0.0",
- "lerna": "^3.0.0",
- "mdast-zone": "^4.0.0",
+ "hast-util-assert": "^3.0.0",
+ "lerna": "^4.0.0",
+ "mdast-zone": "^5.0.0",
"prettier": "^2.0.0",
"remark-cli": "^9.0.0",
"remark-preset-wooorm": "^8.0.0",
"tape": "^5.0.0",
- "to-vfile": "^6.0.0",
- "unist-builder": "^2.0.0",
- "unist-util-remove-position": "^3.0.0",
+ "to-vfile": "^7.0.0",
+ "unified": "^10.0.0",
+ "unist-builder": "^3.0.0",
+ "unist-util-remove-position": "^4.0.0",
"xo": "^0.38.0"
},
"scripts": {
@@ -50,7 +51,7 @@
"remarkConfig": {
"plugins": [
"preset-wooorm",
- "./script/parse-error"
+ "./script/parse-error.js"
]
}
}
diff --git a/packages/rehype-parse/index.js b/packages/rehype-parse/index.js
index c42d5fc7..4964418d 100644
--- a/packages/rehype-parse/index.js
+++ b/packages/rehype-parse/index.js
@@ -1,5 +1,5 @@
-import fromParse5 from 'hast-util-from-parse5'
import Parser5 from 'parse5/lib/parser/index.js'
+import {fromParse5} from 'hast-util-from-parse5'
import {errors} from './errors.js'
const base = 'https://html.spec.whatwg.org/multipage/parsing.html#parse-error-'
diff --git a/packages/rehype-parse/package.json b/packages/rehype-parse/package.json
index 3dc46cd9..05184d6e 100644
--- a/packages/rehype-parse/package.json
+++ b/packages/rehype-parse/package.json
@@ -36,7 +36,7 @@
"index.js"
],
"dependencies": {
- "hast-util-from-parse5": "^6.0.0",
+ "hast-util-from-parse5": "^7.0.0",
"parse5": "^6.0.0"
},
"xo": false
diff --git a/packages/rehype-stringify/index.js b/packages/rehype-stringify/index.js
index 6a1f384b..0a01bba2 100644
--- a/packages/rehype-stringify/index.js
+++ b/packages/rehype-stringify/index.js
@@ -1,4 +1,4 @@
-import toHTML from 'hast-util-to-html'
+import {toHtml} from 'hast-util-to-html'
export default function rehypeStringify(config) {
const settings = Object.assign({}, config, this.data('settings'))
@@ -6,6 +6,6 @@ export default function rehypeStringify(config) {
this.Compiler = compiler
function compiler(tree) {
- return toHTML(tree, settings)
+ return toHtml(tree, settings)
}
}
diff --git a/packages/rehype-stringify/package.json b/packages/rehype-stringify/package.json
index 37a771a9..2ddb78d1 100644
--- a/packages/rehype-stringify/package.json
+++ b/packages/rehype-stringify/package.json
@@ -37,7 +37,7 @@
"index.js"
],
"dependencies": {
- "hast-util-to-html": "^7.1.1"
+ "hast-util-to-html": "^8.0.0"
},
"xo": false
}
diff --git a/packages/rehype/index.js b/packages/rehype/index.js
index b5e443e4..9d3ae405 100644
--- a/packages/rehype/index.js
+++ b/packages/rehype/index.js
@@ -1,4 +1,4 @@
-import unified from 'unified'
+import {unified} from 'unified'
import rehypeParse from 'rehype-parse'
import rehypeStringify from 'rehype-stringify'
diff --git a/packages/rehype/package.json b/packages/rehype/package.json
index b9af75ac..67f03d69 100644
--- a/packages/rehype/package.json
+++ b/packages/rehype/package.json
@@ -19,7 +19,7 @@
"dependencies": {
"rehype-parse": "^7.0.0",
"rehype-stringify": "^8.0.0",
- "unified": "^9.0.0"
+ "unified": "^10.0.0"
},
"homepage": "https://github.com/rehypejs/rehype",
"repository": "https://github.com/rehypejs/rehype/tree/main/packages/rehype",
diff --git a/script/parse-error.js b/script/parse-error.js
index 6f30d9d7..0cc3727e 100644
--- a/script/parse-error.js
+++ b/script/parse-error.js
@@ -1,8 +1,8 @@
import fs from 'fs'
-import u from 'unist-builder'
-import unified from 'unified'
+import {u} from 'unist-builder'
+import {unified} from 'unified'
import parse from 'remark-parse'
-import zone from 'mdast-zone'
+import {zone} from 'mdast-zone'
import {errors} from '../packages/rehype-parse/errors.js'
const pkg = JSON.parse(fs.readFileSync('package.json'))
diff --git a/script/regenerate-fixtures.js b/script/regenerate-fixtures.js
index 7eaddbfe..2bca8da6 100644
--- a/script/regenerate-fixtures.js
+++ b/script/regenerate-fixtures.js
@@ -1,11 +1,11 @@
import fs from 'fs'
import path from 'path'
-import bail from 'bail'
-import rehype from '../packages/rehype/index.js'
+import {bail} from 'bail'
+import {rehype} from '../packages/rehype/index.js'
const join = path.join
-const root = join(__dirname, '..', 'test', 'fixtures')
+const root = join(process.cwd(), 'test', 'fixtures')
fs.readdir(join(root), (error, files) => {
let index = -1
diff --git a/test/api.js b/test/api.js
index 3aff1960..202aa34a 100644
--- a/test/api.js
+++ b/test/api.js
@@ -1,25 +1,28 @@
import fs from 'fs'
import path from 'path'
import test from 'tape'
-import vfile from 'to-vfile'
-import clean from 'unist-util-remove-position'
-import hast from 'hast-util-assert'
-import unified from '../packages/rehype/node_modules/unified/index.js'
-import parse from '../packages/rehype-parse/index.js'
-import stringify from '../packages/rehype-stringify/index.js'
+import {readSync} from 'to-vfile'
+import {removePosition} from 'unist-util-remove-position'
+import {assert} from 'hast-util-assert'
+import {unified} from '../packages/rehype/node_modules/unified/index.js'
+import rehypeParse from '../packages/rehype-parse/index.js'
+import rehypeStringify from '../packages/rehype-stringify/index.js'
import {rehype} from '../packages/rehype/index.js'
const fragment = {fragment: true}
test('rehype().parse(file)', (t) => {
t.equal(
- unified().use(parse).parse('Alfred').children.length,
+ unified().use(rehypeParse).parse('Alfred').children.length,
1,
'should accept a `string`'
)
t.deepEqual(
- clean(unified().use(parse, fragment).parse(''), true),
+ removePosition(
+ unified().use(rehypeParse, fragment).parse(''),
+ true
+ ),
{
type: 'root',
children: [
@@ -42,7 +45,10 @@ test('rehype().parse(file)', (t) => {
)
t.deepEqual(
- clean(unified().use(parse, fragment).parse(''), true),
+ removePosition(
+ unified().use(rehypeParse, fragment).parse(''),
+ true
+ ),
{
type: 'root',
children: [
@@ -71,7 +77,7 @@ test('rehype().parse(file)', (t) => {
test('rehype().stringify(ast, file, options?)', (t) => {
t.throws(
() => {
- unified().use(stringify).stringify(false)
+ unified().use(rehypeStringify).stringify(false)
},
/false/,
'should throw when `ast` is not a node'
@@ -79,21 +85,23 @@ test('rehype().stringify(ast, file, options?)', (t) => {
t.throws(
() => {
- unified().use(stringify).stringify({type: 'unicorn'})
+ unified().use(rehypeStringify).stringify({type: 'unicorn'})
},
/unicorn/,
'should throw when `ast` is not a valid node'
)
t.equal(
- unified().use(stringify).stringify({type: 'text', value: 'alpha < bravo'}),
+ unified()
+ .use(rehypeStringify)
+ .stringify({type: 'text', value: 'alpha < bravo'}),
'alpha < bravo',
'should escape entities'
)
t.equal(
unified()
- .use(stringify, {entities: {}})
+ .use(rehypeStringify, {entities: {}})
.stringify({type: 'text', value: 'alpha < bravo'}),
'alpha < bravo',
'should encode entities (numbered by default)'
@@ -101,35 +109,35 @@ test('rehype().stringify(ast, file, options?)', (t) => {
t.equal(
unified()
- .use(stringify, {entities: {useNamedReferences: true}})
+ .use(rehypeStringify, {entities: {useNamedReferences: true}})
.stringify({type: 'text', value: 'alpha < bravo'}),
'alpha < bravo',
'should encode entities (numbered by default)'
)
t.equal(
- unified().use(stringify).stringify({type: 'element', tagName: 'img'}),
+ unified().use(rehypeStringify).stringify({type: 'element', tagName: 'img'}),
'',
'should not close void elements'
)
t.equal(
unified()
- .use(stringify, {closeSelfClosing: true})
+ .use(rehypeStringify, {closeSelfClosing: true})
.stringify({type: 'element', tagName: 'img'}),
'',
'should close void elements if `closeSelfClosing` is given'
)
t.equal(
- unified().use(stringify).stringify({type: 'element', tagName: 'foo'}),
+ unified().use(rehypeStringify).stringify({type: 'element', tagName: 'foo'}),
'',
'should not close unknown elements by default'
)
t.equal(
unified()
- .use(stringify, {voids: 'foo'})
+ .use(rehypeStringify, {voids: 'foo'})
.stringify({type: 'element', tagName: 'foo'}),
'',
'should close void elements if configured'
@@ -225,7 +233,7 @@ test('fixtures', (t) => {
setImmediate(next) // Queue next.
t.test(fixture, (st) => {
- const file = vfile.readSync(path.join(fp, 'index.html'))
+ const file = readSync(path.join(fp, 'index.html'))
let config = {}
let tree
let result
@@ -252,7 +260,7 @@ test('fixtures', (t) => {
return
}
- hast(node)
+ assert(node)
st.deepEqual(tree, node, 'should parse `' + fixture + '`')
@@ -266,8 +274,8 @@ test('fixtures', (t) => {
if (config.reprocess !== false) {
st.deepEqual(
- clean(node),
- clean(rehype().data('settings', config).parse(out)),
+ removePosition(node),
+ removePosition(rehype().data('settings', config).parse(out)),
'should re-parse `' + fixture + '`'
)
}
diff --git a/test/fixtures/doctype-almost-standards/config.json b/test/fixtures/doctype-almost-standards/config.json
new file mode 100644
index 00000000..d8a7bee2
--- /dev/null
+++ b/test/fixtures/doctype-almost-standards/config.json
@@ -0,0 +1,3 @@
+{
+ "reprocess": false
+}
diff --git a/test/fixtures/doctype-almost-standards/index.json b/test/fixtures/doctype-almost-standards/index.json
index d3bbee80..62b3be75 100644
--- a/test/fixtures/doctype-almost-standards/index.json
+++ b/test/fixtures/doctype-almost-standards/index.json
@@ -3,9 +3,6 @@
"children": [
{
"type": "doctype",
- "name": "html",
- "public": "-//W3C//DTD XHTML 1.0 Transitional//EN",
- "system": null,
"position": {
"start": {
"line": 1,
diff --git a/test/fixtures/doctype-almost-standards/result.html b/test/fixtures/doctype-almost-standards/result.html
index 8ceb1ac3..6f1ece37 100644
--- a/test/fixtures/doctype-almost-standards/result.html
+++ b/test/fixtures/doctype-almost-standards/result.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/test/fixtures/doctype-legacy-double/index.json b/test/fixtures/doctype-legacy-double/index.json
index dc96ec11..49bbca6c 100644
--- a/test/fixtures/doctype-legacy-double/index.json
+++ b/test/fixtures/doctype-legacy-double/index.json
@@ -3,9 +3,6 @@
"children": [
{
"type": "doctype",
- "name": "html",
- "public": null,
- "system": "about:legacy-compat",
"position": {
"start": {
"line": 1,
diff --git a/test/fixtures/doctype-legacy-double/result.html b/test/fixtures/doctype-legacy-double/result.html
index af80c626..6f1ece37 100644
--- a/test/fixtures/doctype-legacy-double/result.html
+++ b/test/fixtures/doctype-legacy-double/result.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/test/fixtures/doctype-legacy-single/index.json b/test/fixtures/doctype-legacy-single/index.json
index dc96ec11..49bbca6c 100644
--- a/test/fixtures/doctype-legacy-single/index.json
+++ b/test/fixtures/doctype-legacy-single/index.json
@@ -3,9 +3,6 @@
"children": [
{
"type": "doctype",
- "name": "html",
- "public": null,
- "system": "about:legacy-compat",
"position": {
"start": {
"line": 1,
diff --git a/test/fixtures/doctype-legacy-single/result.html b/test/fixtures/doctype-legacy-single/result.html
index af80c626..6f1ece37 100644
--- a/test/fixtures/doctype-legacy-single/result.html
+++ b/test/fixtures/doctype-legacy-single/result.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/test/fixtures/doctype-nameless/config.json b/test/fixtures/doctype-nameless/config.json
new file mode 100644
index 00000000..d8a7bee2
--- /dev/null
+++ b/test/fixtures/doctype-nameless/config.json
@@ -0,0 +1,3 @@
+{
+ "reprocess": false
+}
diff --git a/test/fixtures/doctype-nameless/index.json b/test/fixtures/doctype-nameless/index.json
index 62d4f6d6..f151c1bf 100644
--- a/test/fixtures/doctype-nameless/index.json
+++ b/test/fixtures/doctype-nameless/index.json
@@ -3,9 +3,6 @@
"children": [
{
"type": "doctype",
- "name": "",
- "public": null,
- "system": null,
"position": {
"start": {
"line": 1,
diff --git a/test/fixtures/doctype-nameless/result.html b/test/fixtures/doctype-nameless/result.html
index 030eefc7..6f1ece37 100644
--- a/test/fixtures/doctype-nameless/result.html
+++ b/test/fixtures/doctype-nameless/result.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/test/fixtures/doctype-quirksmode-ibm/config.json b/test/fixtures/doctype-quirksmode-ibm/config.json
new file mode 100644
index 00000000..d8a7bee2
--- /dev/null
+++ b/test/fixtures/doctype-quirksmode-ibm/config.json
@@ -0,0 +1,3 @@
+{
+ "reprocess": false
+}
diff --git a/test/fixtures/doctype-quirksmode-ibm/index.json b/test/fixtures/doctype-quirksmode-ibm/index.json
index 56aa00b6..92f7f345 100644
--- a/test/fixtures/doctype-quirksmode-ibm/index.json
+++ b/test/fixtures/doctype-quirksmode-ibm/index.json
@@ -3,9 +3,6 @@
"children": [
{
"type": "doctype",
- "name": "html",
- "public": null,
- "system": "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",
"position": {
"start": {
"line": 1,
diff --git a/test/fixtures/doctype-quirksmode-ibm/result.html b/test/fixtures/doctype-quirksmode-ibm/result.html
index e18ab5f6..6f1ece37 100644
--- a/test/fixtures/doctype-quirksmode-ibm/result.html
+++ b/test/fixtures/doctype-quirksmode-ibm/result.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/test/fixtures/doctype-quotes-double/index.json b/test/fixtures/doctype-quotes-double/index.json
index 2b0065d3..b6367e36 100644
--- a/test/fixtures/doctype-quotes-double/index.json
+++ b/test/fixtures/doctype-quotes-double/index.json
@@ -3,9 +3,6 @@
"children": [
{
"type": "doctype",
- "name": "html",
- "public": "-//Alpha \"bravo\" charlie//DTD HTML Extended 1.0//EN",
- "system": null,
"position": {
"start": {
"line": 1,
diff --git a/test/fixtures/doctype-quotes-double/result.html b/test/fixtures/doctype-quotes-double/result.html
index 2fc51aef..6f1ece37 100644
--- a/test/fixtures/doctype-quotes-double/result.html
+++ b/test/fixtures/doctype-quotes-double/result.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/test/fixtures/doctype-quotes-single/index.json b/test/fixtures/doctype-quotes-single/index.json
index 4bfd0d37..b6367e36 100644
--- a/test/fixtures/doctype-quotes-single/index.json
+++ b/test/fixtures/doctype-quotes-single/index.json
@@ -3,9 +3,6 @@
"children": [
{
"type": "doctype",
- "name": "html",
- "public": "-//Alpha 'bravo' charlie//DTD HTML Extended 1.0//EN",
- "system": null,
"position": {
"start": {
"line": 1,
diff --git a/test/fixtures/doctype-quotes-single/result.html b/test/fixtures/doctype-quotes-single/result.html
index 112f0bfc..6f1ece37 100644
--- a/test/fixtures/doctype-quotes-single/result.html
+++ b/test/fixtures/doctype-quotes-single/result.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/test/fixtures/doctype/index.json b/test/fixtures/doctype/index.json
index 447319d9..c5c19e07 100644
--- a/test/fixtures/doctype/index.json
+++ b/test/fixtures/doctype/index.json
@@ -3,9 +3,6 @@
"children": [
{
"type": "doctype",
- "name": "html",
- "public": null,
- "system": null,
"position": {
"start": {
"line": 1,
diff --git a/test/fixtures/noscript/index.json b/test/fixtures/noscript/index.json
index e1bda735..5b0f6dd5 100644
--- a/test/fixtures/noscript/index.json
+++ b/test/fixtures/noscript/index.json
@@ -3,9 +3,6 @@
"children": [
{
"type": "doctype",
- "name": "html",
- "public": null,
- "system": null,
"position": {
"start": {
"line": 1,
diff --git a/test/fixtures/quirksmode-off/index.json b/test/fixtures/quirksmode-off/index.json
index 165290f9..97293847 100644
--- a/test/fixtures/quirksmode-off/index.json
+++ b/test/fixtures/quirksmode-off/index.json
@@ -3,9 +3,6 @@
"children": [
{
"type": "doctype",
- "name": "html",
- "public": null,
- "system": null,
"position": {
"start": {
"line": 1,
diff --git a/test/fixtures/svg-in-html/index.json b/test/fixtures/svg-in-html/index.json
index 71c1efd5..38e9be74 100644
--- a/test/fixtures/svg-in-html/index.json
+++ b/test/fixtures/svg-in-html/index.json
@@ -3,9 +3,6 @@
"children": [
{
"type": "doctype",
- "name": "html",
- "public": null,
- "system": null,
"position": {
"start": {
"line": 1,
diff --git a/test/parse-error.js b/test/parse-error.js
index 1871077a..2f8e269a 100644
--- a/test/parse-error.js
+++ b/test/parse-error.js
@@ -1,7 +1,7 @@
import fs from 'fs'
import path from 'path'
import test from 'tape'
-import vfile from 'to-vfile'
+import {toVFile, readSync} from 'to-vfile'
import {rehype} from '../packages/rehype/index.js'
import p5errors from '../packages/rehype-parse/node_modules/parse5/lib/common/error-codes.js'
import {errors as rerrors} from '../packages/rehype-parse/errors.js'
@@ -24,9 +24,9 @@ test('parse-errors', (t) => {
const fixtures = fs.readdirSync(root)
t.test('surrogate-in-input-stream', (st) => {
- const file = vfile({
+ const file = toVFile({
path: 'index.html',
- contents: '\n' + String.fromCharCode(0xd800)
+ value: '\n' + String.fromCharCode(0xd800)
})
rehype().data('settings', {emitParseErrors: true}).parse(file)
@@ -40,7 +40,7 @@ test('parse-errors', (t) => {
reason: 'Unexpected surrogate character',
line: 2,
column: 1,
- location: {
+ position: {
start: {line: 2, column: 1, offset: 16},
end: {line: 2, column: 1, offset: 16}
},
@@ -75,7 +75,7 @@ test('parse-errors', (t) => {
setImmediate(next) // Queue next.
t.test(fixture, (st) => {
- const file = vfile.readSync(path.join(fp, 'index.html'), 'utf8')
+ const file = readSync(path.join(fp, 'index.html'), 'utf8')
const messages = JSON.parse(
fs.readFileSync(path.join(fp, 'messages.json'), 'utf8')
)
diff --git a/test/parse-error/abandoned-head-element-child/messages.json b/test/parse-error/abandoned-head-element-child/messages.json
index a0d63782..d97fd6d8 100644
--- a/test/parse-error/abandoned-head-element-child/messages.json
+++ b/test/parse-error/abandoned-head-element-child/messages.json
@@ -5,7 +5,7 @@
"reason": "Unexpected metadata element after head",
"line": 4,
"column": 1,
- "location": {
+ "position": {
"start": {
"line": 4,
"column": 1,
diff --git a/test/parse-error/abrupt-closing-of-empty-comment/messages.json b/test/parse-error/abrupt-closing-of-empty-comment/messages.json
index fbcace81..56eb37f2 100644
--- a/test/parse-error/abrupt-closing-of-empty-comment/messages.json
+++ b/test/parse-error/abrupt-closing-of-empty-comment/messages.json
@@ -5,7 +5,7 @@
"reason": "Unexpected abruptly closed empty comment",
"line": 3,
"column": 15,
- "location": {
+ "position": {
"start": {
"line": 3,
"column": 15,
@@ -30,7 +30,7 @@
"reason": "Unexpected abruptly closed empty comment",
"line": 4,
"column": 20,
- "location": {
+ "position": {
"start": {
"line": 4,
"column": 20,
diff --git a/test/parse-error/abrupt-doctype-public-identifier/messages.json b/test/parse-error/abrupt-doctype-public-identifier/messages.json
index 65b3942f..f90a37a6 100644
--- a/test/parse-error/abrupt-doctype-public-identifier/messages.json
+++ b/test/parse-error/abrupt-doctype-public-identifier/messages.json
@@ -5,7 +5,7 @@
"reason": "Unexpected abruptly closed public identifier",
"line": 1,
"column": 27,
- "location": {
+ "position": {
"start": {
"line": 1,
"column": 27,
@@ -30,7 +30,7 @@
"reason": "Unexpected non-conforming doctype declaration",
"line": 1,
"column": 1,
- "location": {
+ "position": {
"start": {
"line": 1,
"column": 1,
diff --git a/test/parse-error/abrupt-doctype-system-identifier/messages.json b/test/parse-error/abrupt-doctype-system-identifier/messages.json
index 97b1fdea..8ca81631 100644
--- a/test/parse-error/abrupt-doctype-system-identifier/messages.json
+++ b/test/parse-error/abrupt-doctype-system-identifier/messages.json
@@ -5,7 +5,7 @@
"reason": "Unexpected abruptly closed system identifier",
"line": 1,
"column": 55,
- "location": {
+ "position": {
"start": {
"line": 1,
"column": 55,
@@ -30,7 +30,7 @@
"reason": "Unexpected non-conforming doctype declaration",
"line": 1,
"column": 1,
- "location": {
+ "position": {
"start": {
"line": 1,
"column": 1,
diff --git a/test/parse-error/absence-of-digits-in-numeric-character-reference/messages.json b/test/parse-error/absence-of-digits-in-numeric-character-reference/messages.json
index 6458c663..7e21d200 100644
--- a/test/parse-error/absence-of-digits-in-numeric-character-reference/messages.json
+++ b/test/parse-error/absence-of-digits-in-numeric-character-reference/messages.json
@@ -5,7 +5,7 @@
"reason": "Unexpected non-digit at start of numeric character reference",
"line": 3,
"column": 3,
- "location": {
+ "position": {
"start": {
"line": 3,
"column": 3,
@@ -30,7 +30,7 @@
"reason": "Unexpected non-digit at start of numeric character reference",
"line": 4,
"column": 4,
- "location": {
+ "position": {
"start": {
"line": 4,
"column": 4,
diff --git a/test/parse-error/cdata-in-html-content/messages.json b/test/parse-error/cdata-in-html-content/messages.json
index 879c1a8c..d2ad065a 100644
--- a/test/parse-error/cdata-in-html-content/messages.json
+++ b/test/parse-error/cdata-in-html-content/messages.json
@@ -5,7 +5,7 @@
"reason": "Unexpected CDATA section in HTML",
"line": 3,
"column": 9,
- "location": {
+ "position": {
"start": {
"line": 3,
"column": 9,
diff --git a/test/parse-error/character-reference-outside-unicode-range/messages.json b/test/parse-error/character-reference-outside-unicode-range/messages.json
index 56e54973..5d4057ed 100644
--- a/test/parse-error/character-reference-outside-unicode-range/messages.json
+++ b/test/parse-error/character-reference-outside-unicode-range/messages.json
@@ -5,7 +5,7 @@
"reason": "Unexpected too big numeric character reference",
"line": 3,
"column": 11,
- "location": {
+ "position": {
"start": {
"line": 3,
"column": 11,
@@ -30,7 +30,7 @@
"reason": "Unexpected too big numeric character reference",
"line": 4,
"column": 11,
- "location": {
+ "position": {
"start": {
"line": 4,
"column": 11,
diff --git a/test/parse-error/closing-of-element-with-open-child-elements/messages.json b/test/parse-error/closing-of-element-with-open-child-elements/messages.json
index dc615604..06b0ed92 100644
--- a/test/parse-error/closing-of-element-with-open-child-elements/messages.json
+++ b/test/parse-error/closing-of-element-with-open-child-elements/messages.json
@@ -5,7 +5,7 @@
"reason": "Unexpected closing tag with open child elements",
"line": 3,
"column": 19,
- "location": {
+ "position": {
"start": {
"line": 3,
"column": 19,
diff --git a/test/parse-error/control-character-in-input-stream/messages.json b/test/parse-error/control-character-in-input-stream/messages.json
index 04a1be38..56142a94 100644
--- a/test/parse-error/control-character-in-input-stream/messages.json
+++ b/test/parse-error/control-character-in-input-stream/messages.json
@@ -5,7 +5,7 @@
"reason": "Unexpected control character",
"line": 4,
"column": 1,
- "location": {
+ "position": {
"start": {
"line": 4,
"column": 1,
diff --git a/test/parse-error/control-character-reference/messages.json b/test/parse-error/control-character-reference/messages.json
index 61139147..1a50c1f0 100644
--- a/test/parse-error/control-character-reference/messages.json
+++ b/test/parse-error/control-character-reference/messages.json
@@ -5,7 +5,7 @@
"reason": "Unexpected control character reference",
"line": 3,
"column": 7,
- "location": {
+ "position": {
"start": {
"line": 3,
"column": 7,
diff --git a/test/parse-error/disallowed-content-in-noscript-in-head/messages.json b/test/parse-error/disallowed-content-in-noscript-in-head/messages.json
index 6b3c5b80..f6b8390b 100644
--- a/test/parse-error/disallowed-content-in-noscript-in-head/messages.json
+++ b/test/parse-error/disallowed-content-in-noscript-in-head/messages.json
@@ -5,7 +5,7 @@
"reason": "Disallowed content inside `