Skip to content

Commit b4b5405

Browse files
committed
Update style-to-object
1 parent 168f0dd commit b4b5405

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/index.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,10 @@
164164
import {stringify as commas} from 'comma-separated-tokens'
165165
import {html, svg, find, hastToReact} from 'property-information'
166166
import {stringify as spaces} from 'space-separated-tokens'
167-
// @ts-expect-error: typed incorrectly
168167
import styleToObject from 'style-to-object'
169168
import {pointStart} from 'unist-util-position'
170169
import {VFileMessage} from 'vfile-message'
171170

172-
/** @type {(value: string, replacer: ((key: string, value: string) => void)) => void} */
173-
const style = styleToObject
174-
175171
const own = {}.hasOwnProperty
176172

177173
/**
@@ -459,7 +455,7 @@ function parseStyle(state, node, value) {
459455
const result = {}
460456

461457
try {
462-
style(value, replacer)
458+
styleToObject(value, replacer)
463459
} catch (error_) {
464460
const error = /** @type {Error} */ (error_)
465461
const cleanMessage = error.message.replace(/^undefined:\d+:\d+: /, '')

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"comma-separated-tokens": "^2.0.0",
4242
"property-information": "^6.0.0",
4343
"space-separated-tokens": "^2.0.0",
44-
"style-to-object": "^0.4.0",
44+
"style-to-object": "^0.4.1",
4545
"unist-util-position": "^4.0.0",
4646
"vfile-message": "^3.0.0"
4747
},

0 commit comments

Comments
 (0)