Skip to content

Commit 671a5a4

Browse files
committed
Update dev-dependencies
1 parent 320c2ff commit 671a5a4

File tree

5 files changed

+44
-45
lines changed

5 files changed

+44
-45
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ jobs:
77
name: ${{matrix.node}}
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
11-
- uses: actions/setup-node@v3
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
1212
with:
1313
node-version: ${{matrix.node}}
1414
- run: npm install
1515
- run: npm test
16-
- uses: codecov/codecov-action@v3
16+
- uses: codecov/codecov-action@v4
1717
strategy:
1818
matrix:
1919
node:
2020
- lts/gallium
21-
- node
21+
- lts/iron

lib/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,6 @@ function startTag(node, state) {
540540
{...node, children: []},
541541
{space: ns === webNamespaces.svg ? 'svg' : 'html'}
542542
)
543-
// Always element.
544-
/* c8 ignore next */
545-
const attrs = 'attrs' in result ? result.attrs : []
546543

547544
/** @type {TagToken} */
548545
const tag = {
@@ -552,7 +549,9 @@ function startTag(node, state) {
552549
// We always send start and end tags.
553550
selfClosing: false,
554551
ackSelfClosing: false,
555-
attrs,
552+
// Always element.
553+
/* c8 ignore next */
554+
attrs: 'attrs' in result ? result.attrs : [],
556555
location: createParse5Location(node)
557556
}
558557

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
"hastscript": "^9.0.0",
5656
"mdast-util-from-markdown": "^2.0.0",
5757
"prettier": "^3.0.0",
58-
"remark-cli": "^11.0.0",
59-
"remark-preset-wooorm": "^9.0.0",
58+
"remark-cli": "^12.0.0",
59+
"remark-preset-wooorm": "^10.0.0",
6060
"type-coverage": "^2.0.0",
6161
"typescript": "^5.0.0",
6262
"unist-builder": "^4.0.0",
63-
"xo": "^0.56.0"
63+
"xo": "^0.58.0"
6464
},
6565
"scripts": {
6666
"prepack": "npm run build && npm run format",

readme.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ HTML) again, keeping positional info okay.
1313

1414
## Contents
1515

16-
* [What is this?](#what-is-this)
17-
* [When should I use this?](#when-should-i-use-this)
18-
* [Install](#install)
19-
* [Use](#use)
20-
* [API](#api)
21-
* [`raw(tree[, options])`](#rawtree-options)
22-
* [`Options`](#options)
23-
* [Types](#types)
24-
* [Compatibility](#compatibility)
25-
* [Security](#security)
26-
* [Related](#related)
27-
* [Contribute](#contribute)
28-
* [License](#license)
16+
* [What is this?](#what-is-this)
17+
* [When should I use this?](#when-should-i-use-this)
18+
* [Install](#install)
19+
* [Use](#use)
20+
* [API](#api)
21+
* [`raw(tree[, options])`](#rawtree-options)
22+
* [`Options`](#options)
23+
* [Types](#types)
24+
* [Compatibility](#compatibility)
25+
* [Security](#security)
26+
* [Related](#related)
27+
* [Contribute](#contribute)
28+
* [License](#license)
2929

3030
## What is this?
3131

@@ -53,10 +53,10 @@ If your final result is HTML and you trust content, then “strings” are fine
5353
HTML through untouched).
5454
But there are two main cases where a proper syntax tree is preferred:
5555

56-
* hast utilities need a proper syntax tree as they operate on actual nodes to
57-
inspect or transform things, they can’t operate on strings of HTML
58-
* other output formats (React, MDX, etc) need actual nodes and can’t handle
59-
strings of HTML
56+
* hast utilities need a proper syntax tree as they operate on actual nodes to
57+
inspect or transform things, they can’t operate on strings of HTML
58+
* other output formats (React, MDX, etc) need actual nodes and can’t handle
59+
strings of HTML
6060

6161
The plugin [`rehype-raw`][rehype-raw] wraps this utility at a higher-level
6262
(easier) abstraction.
@@ -127,10 +127,10 @@ nodes into actual nodes.
127127

128128
###### Parameters
129129

130-
* `tree` ([`Node`][node])
131-
— original hast tree to transform
132-
* `options` ([`Options`][api-options], optional)
133-
— configuration
130+
* `tree` ([`Node`][node])
131+
— original hast tree to transform
132+
* `options` ([`Options`][api-options], optional)
133+
— configuration
134134

135135
###### Returns
136136

@@ -142,12 +142,12 @@ Configuration (TypeScript type).
142142

143143
###### Fields
144144

145-
* `passThrough` (`Array<string>`, optional)
146-
— list of custom hast node types to pass through (keep).
147-
If the passed through nodes have children, those children are expected to be
148-
hast and will be handled by this utility
149-
* `file` ([`VFile`][vfile], optional)
150-
— corresponding virtual file representing the input document
145+
* `passThrough` (`Array<string>`, optional)
146+
— list of custom hast node types to pass through (keep).
147+
If the passed through nodes have children, those children are expected to be
148+
hast and will be handled by this utility
149+
* `file` ([`VFile`][vfile], optional)
150+
— corresponding virtual file representing the input document
151151

152152
## Types
153153

@@ -189,10 +189,10 @@ Either do not use this utility in combination with user input, or use
189189

190190
## Related
191191

192-
* [`mdast-util-to-hast`][mdast-util-to-hast]
193-
— transform mdast to hast
194-
* [`rehype-raw`](https://github.com/rehypejs/rehype-raw)
195-
— rehype plugin
192+
* [`mdast-util-to-hast`][mdast-util-to-hast]
193+
— transform mdast to hast
194+
* [`rehype-raw`](https://github.com/rehypejs/rehype-raw)
195+
— rehype plugin
196196

197197
## Contribute
198198

test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ test('integration', async function (t) {
631631
await t.test(
632632
'should work together with the mdast -> hast utilities',
633633
async function () {
634-
const doc = [
634+
const document = [
635635
'<i>Some title</i>',
636636
'',
637637
'<p>Hello, world!',
@@ -1002,9 +1002,9 @@ test('integration', async function (t) {
10021002
}
10031003
}
10041004

1005-
const mdast = fromMarkdown(doc)
1005+
const mdast = fromMarkdown(document)
10061006
const hast = toHast(mdast, {allowDangerousHtml: true})
1007-
const hast2 = raw(hast, {file: new VFile(doc)})
1007+
const hast2 = raw(hast, {file: new VFile(document)})
10081008

10091009
assert.deepEqual(hast2, expected)
10101010

0 commit comments

Comments
 (0)