Skip to content

Commit b1b8855

Browse files
committed
fix: restore class methods on Token objects
1 parent cbe3552 commit b1b8855

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import clone from "clone"
22
import uslug from "uslug"
3+
import Token from "markdown-it/lib/token"
34

45
const TOC = "@[toc]"
56
const TOC_RE = /^@\[toc\]/im
67

78
let markdownItSecondInstance = () => {}
8-
let Token = () => {}
99
let headingIds = {}
1010
let tocHtml = ""
1111

@@ -149,7 +149,6 @@ export default function(md, options) {
149149
headingIds = {}
150150

151151
md.core.ruler.push("init_toc", function(state) {
152-
Token = state.Token
153152
const tokens = state.tokens
154153

155154
// reset key ids for each document

0 commit comments

Comments
 (0)