Skip to content

Commit cfb6fec

Browse files
authored
Merge pull request #8 from timlrx/esm
chore: update dependencies and export as esm module
2 parents 8b46c66 + 9e68448 commit cfb6fec

File tree

4 files changed

+173
-159
lines changed

4 files changed

+173
-159
lines changed

index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
2-
* @typedef {import('unist-util-visit').Node & {properties: Object<any, any>}} Node
3-
* @typedef {import('unist-util-visit').Parent & {properties: Object<any, any>}} Parent
2+
* @typedef {import('unist').Node & {properties: Object<any, any>}} Node
3+
* @typedef {import('unist').Parent & {properties: Object<any, any>}} Parent
44
* @typedef {import('unist-util-visit').Visitor<Node>} Visitor
55
*/
66

77
import { visit } from 'unist-util-visit'
8-
import toString from 'hast-util-to-string'
8+
import { toString } from 'hast-util-to-string'
99
import { refractor } from 'refractor/lib/all.js'
1010
import rangeParser from 'parse-numeric-range'
1111

@@ -113,6 +113,7 @@ const rehypePrism = (options) => {
113113
}
114114

115115
const shouldHighlightLine = calculateLinesToHighlight(meta)
116+
// @ts-ignore
116117
const codeLineArray = splitLine(toString(node))
117118

118119
for (const [i, line] of codeLineArray.entries()) {

0 commit comments

Comments
 (0)