Skip to content

Commit a937f74

Browse files
committed
revert: temporary revert #4
1 parent d8556ca commit a937f74

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/index.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ function randStr(): string {
3939
}
4040

4141
export type MarkdownItAsyncPlaceholderMap = Map<string, [promise: Promise<string>, str: string, lang: string, attrs: string]>
42-
export type Token = ReturnType<MarkdownIt['parse']>[number]
4342

4443
export class MarkdownItAsync extends MarkdownIt {
4544
placeholderMap: MarkdownItAsyncPlaceholderMap
@@ -75,18 +74,9 @@ export class MarkdownItAsync extends MarkdownIt {
7574
}
7675

7776
async renderAsync(src: string, env?: any): Promise<string> {
78-
return this.rendererRenderAsync(
79-
this.parse(src, env),
80-
this.options,
81-
env,
82-
)
83-
}
84-
85-
async rendererRenderAsync(tokens: Token[], options: Options = this.options, env?: any): Promise<string> {
8677
this.options.highlight = wrapHightlight(this.options.highlight, this.placeholderMap)
8778
this.disableWarn = true
88-
const result = this.renderer.render(tokens, options, env)
89-
79+
const result = this.render(src, env)
9080
this.disableWarn = false
9181
return replaceAsync(result, placeholderRe, async (match, id) => {
9282
if (!this.placeholderMap.has(id))

0 commit comments

Comments
 (0)