fix(core): update

This commit is contained in:
Philipp Kunz 2022-06-26 20:45:40 +02:00
parent 57cadd079c
commit 035e8dc0cd
4 changed files with 977 additions and 560 deletions

1523
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,10 +14,10 @@
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.61", "@gitzone/tsbuild": "^2.1.61",
"@gitzone/tsrun": "^1.2.32", "@gitzone/tsrun": "^1.2.37",
"@gitzone/tstest": "^1.0.71", "@gitzone/tstest": "^1.0.71",
"@pushrocks/tapbundle": "^5.0.3", "@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^17.0.34", "@types/node": "^18.0.0",
"tslint": "^6.1.3", "tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@pushrocks/smartmarkdown', name: '@pushrocks/smartmarkdown',
version: '3.0.0', version: '3.0.1',
description: 'do more with markdown files' description: 'do more with markdown files'
} }

View File

@ -2,6 +2,12 @@ import * as plugins from './smartmarkdown.plugins.js';
import { MdParsedResult } from './smartmarkdown.classes.mdparsedresult.js'; import { MdParsedResult } from './smartmarkdown.classes.mdparsedresult.js';
export class SmartMarkdown { export class SmartMarkdown {
public static async easyMarkdownToHtml(mdStringArg: string) {
const smartmarkdownInstance = new SmartMarkdown();
const mdParsedResult = await smartmarkdownInstance.getMdParsedResultFromMarkdown(mdStringArg);
return mdParsedResult.html;
}
constructor() {} constructor() {}
/** /**
@ -11,7 +17,7 @@ export class SmartMarkdown {
public async getMdParsedResultFromMarkdown(mdStringArg: string): Promise<MdParsedResult> { public async getMdParsedResultFromMarkdown(mdStringArg: string): Promise<MdParsedResult> {
const result = await MdParsedResult.createFromMarkdownString(mdStringArg); const result = await MdParsedResult.createFromMarkdownString(mdStringArg);
return result; return result;
}; }
public htmlToMarkdown(htmlString: string): string { public htmlToMarkdown(htmlString: string): string {
const turndownInstance = new plugins.turndown({ const turndownInstance = new plugins.turndown({