fix(core): update
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import * as plugins from './smartmarkdown.plugins';
|
||||
import * as plugins from './smartmarkdown.plugins.js';
|
||||
|
||||
export class SmartMarkdown {
|
||||
constructor() {}
|
||||
@@ -9,9 +9,9 @@ export class SmartMarkdown {
|
||||
*/
|
||||
public async markdownToHtml(mdString: string): Promise<string> {
|
||||
const result = await plugins
|
||||
.remark()
|
||||
.use(plugins.remarkHtml)
|
||||
.use(plugins.remarkFrontmatter, ['yaml', 'toml'])
|
||||
.remark.remark()
|
||||
.use(plugins.remarkHtml.default)
|
||||
.use(plugins.remarkFrontmatter.default, ['yaml', 'toml'])
|
||||
.process(mdString);
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user