Skip to content

Commit 6f2d4ca

Browse files
lierdakilaminya
authored andcommitted
refactor: merge render and internalRender
1 parent f4f2f27 commit 6f2d4ca

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/renderer.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export type DOMPurifyConfig = Omit<DOMPurify.Config, "RETURN_DOM" | "RETURN_DOM_
2121
* @param purifyConfig (optional) configuration object for DOMPurify
2222
* @return the html string containing the result
2323
*/
24-
function internalRender(
24+
export async function render(
2525
markdownText: string,
2626
scopeName: string = "text.plain",
2727
domPurifyConfig?: DOMPurifyConfig
@@ -52,19 +52,3 @@ function internalRender(
5252
)
5353
})
5454
}
55-
56-
/**
57-
* renders the markdown text to html
58-
* @param markdownText the markdown text to render
59-
* @param grammar the default grammar used in code sections that have no specific grammar set
60-
* @param purifyConfig (optional) configuration object for DOMPurify
61-
* @return the inner HTML text of the rendered section
62-
*/
63-
export async function render(
64-
markdownText: string,
65-
grammar: string,
66-
domPurifyConfig?: DOMPurifyConfig
67-
): Promise<string> {
68-
const html = await internalRender(markdownText, grammar, domPurifyConfig)
69-
return html
70-
}

0 commit comments

Comments
 (0)