Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
6a1d91d5da | |||
035e8dc0cd | |||
57cadd079c | |||
0ead80750a |
1527
package-lock.json
generated
1527
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartmarkdown",
|
||||
"version": "2.0.14",
|
||||
"version": "3.0.1",
|
||||
"private": false,
|
||||
"description": "do more with markdown files",
|
||||
"main": "dist_ts/index.js",
|
||||
@ -14,10 +14,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.61",
|
||||
"@gitzone/tsrun": "^1.2.32",
|
||||
"@gitzone/tsrun": "^1.2.37",
|
||||
"@gitzone/tstest": "^1.0.71",
|
||||
"@pushrocks/tapbundle": "^5.0.3",
|
||||
"@types/node": "^17.0.34",
|
||||
"@types/node": "^18.0.0",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartmarkdown',
|
||||
version: '2.0.14',
|
||||
version: '3.0.1',
|
||||
description: 'do more with markdown files'
|
||||
}
|
||||
|
@ -2,6 +2,12 @@ import * as plugins from './smartmarkdown.plugins.js';
|
||||
import { MdParsedResult } from './smartmarkdown.classes.mdparsedresult.js';
|
||||
|
||||
export class SmartMarkdown {
|
||||
public static async easyMarkdownToHtml(mdStringArg: string) {
|
||||
const smartmarkdownInstance = new SmartMarkdown();
|
||||
const mdParsedResult = await smartmarkdownInstance.getMdParsedResultFromMarkdown(mdStringArg);
|
||||
return mdParsedResult.html;
|
||||
}
|
||||
|
||||
constructor() {}
|
||||
|
||||
/**
|
||||
@ -11,7 +17,7 @@ export class SmartMarkdown {
|
||||
public async getMdParsedResultFromMarkdown(mdStringArg: string): Promise<MdParsedResult> {
|
||||
const result = await MdParsedResult.createFromMarkdownString(mdStringArg);
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
public htmlToMarkdown(htmlString: string): string {
|
||||
const turndownInstance = new plugins.turndown({
|
||||
|
Reference in New Issue
Block a user