fix(core): update

This commit is contained in:
2022-05-19 09:36:59 +02:00
parent dd1f8c928f
commit c42f3ee1b7
10 changed files with 4270 additions and 20164 deletions

View File

@@ -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();
}