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

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartmarkdown',
version: '2.0.12',
description: 'do more with markdown files'
}

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

View File

@ -1,7 +1,7 @@
// third party remark
import remark from 'remark';
import remarkFrontmatter from 'remark-frontmatter';
import remarkHtml from 'remark-html';
import * as remark from 'remark';
import * as remarkFrontmatter from 'remark-frontmatter';
import * as remarkHtml from 'remark-html';
export { remark, remarkFrontmatter, remarkHtml };