Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 080eb73

Browse files
committed
Update dev-dependencies
1 parent 6af3709 commit 080eb73

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

‎lib/handle/element.js‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function element(node, index, parent, state) {
7676
state.schema = svg
7777
}
7878

79-
const attrs = serializeAttributes(state, node.properties)
79+
const attributes = serializeAttributes(state, node.properties)
8080

8181
const content = state.all(
8282
schema.space === 'html' && node.tagName === 'template' ? node.content : node
@@ -92,14 +92,14 @@ export function element(node, index, parent, state) {
9292
// longer void.
9393
if (content) selfClosing = false
9494

95-
if (attrs || !omit || !opening(node, index, parent)) {
96-
parts.push('<', node.tagName, attrs ? ' ' + attrs : '')
95+
if (attributes || !omit || !opening(node, index, parent)) {
96+
parts.push('<', node.tagName, attributes ? ' ' + attributes : '')
9797

9898
if (
9999
selfClosing &&
100100
(schema.space === 'svg' || state.settings.closeSelfClosing)
101101
) {
102-
last = attrs.charAt(attrs.length - 1)
102+
last = attributes.charAt(attributes.length - 1)
103103
if (
104104
!state.settings.tightSelfClosing ||
105105
last === '/' ||
@@ -125,20 +125,20 @@ export function element(node, index, parent, state) {
125125

126126
/**
127127
* @param {State} state
128-
* @param {Properties | null | undefined} props
128+
* @param {Properties | null | undefined} properties
129129
* @returns {string}
130130
*/
131-
function serializeAttributes(state, props) {
131+
function serializeAttributes(state, properties) {
132132
/** @type {Array<string>} */
133133
const values = []
134134
let index = -1
135135
/** @type {string} */
136136
let key
137137

138-
if (props) {
139-
for (key in props) {
140-
if (props[key] !== null && props[key] !== undefined) {
141-
const value = serializeAttribute(state, key, props[key])
138+
if (properties) {
139+
for (key in properties) {
140+
if (properties[key] !== null && properties[key] !== undefined) {
141+
const value = serializeAttribute(state, key, properties[key])
142142
if (value) values.push(value)
143143
}
144144
}

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@
4848
},
4949
"devDependencies": {
5050
"@types/node": "^20.0.0",
51-
"c8": "^8.0.0",
52-
"hastscript": "^8.0.0",
51+
"c8": "^9.0.0",
52+
"hastscript": "^9.0.0",
5353
"prettier": "^3.0.0",
5454
"remark-cli": "^11.0.0",
5555
"remark-preset-wooorm": "^9.0.0",
5656
"type-coverage": "^2.0.0",
5757
"typescript": "^5.0.0",
5858
"unist-builder": "^4.0.0",
59-
"xo": "^0.55.0"
59+
"xo": "^0.58.0"
6060
},
6161
"scripts": {
6262
"prepack": "npm run build && npm run format",

‎test/omission-opening-body.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test('`body` (opening)', async function (t) {
1313
'should not omit tag if the head is a `comment`',
1414
async function () {
1515
assert.deepEqual(
16-
toHtml(h('body', u('comment', 'alpha')), {omitOptionalTags: true}),
16+
toHtml(h('body', [u('comment', 'alpha')]), {omitOptionalTags: true}),
1717
'<body><!--alpha-->'
1818
)
1919
}

‎test/text.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ test('`text`', async function (t) {
1515

1616
await t.test('should not encode `text`s in `style`', async function () {
1717
assert.deepEqual(
18-
toHtml(h('style', u('text', '*:before {content: "3 < 5"}'))),
18+
toHtml(h('style', [u('text', '*:before {content: "3 < 5"}')])),
1919
'<style>*:before {content: "3 < 5"}</style>'
2020
)
2121
})
2222

2323
await t.test('should not encode `text`s in `script`', async function () {
2424
assert.deepEqual(
25-
toHtml(h('script', u('text', 'alert("3 < 5")'))),
25+
toHtml(h('script', [u('text', 'alert("3 < 5")')])),
2626
'<script>alert("3 < 5")</script>'
2727
)
2828
})
2929

3030
await t.test('should encode `text`s in other nodes', async function () {
31-
assert.deepEqual(toHtml(h('b', u('text', '3 < 5'))), '<b>3 &#x3C; 5</b>')
31+
assert.deepEqual(toHtml(h('b', [u('text', '3 < 5')])), '<b>3 &#x3C; 5</b>')
3232
})
3333
})

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /