lys-markdown-parser
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -21,3 +21,3 @@ "use strict"; | ||
}); | ||
exports.Markdown = exports.default = void 0; | ||
exports.default = exports.Markdown = void 0; | ||
@@ -181,3 +181,3 @@ var _diff = require("./diff.js"); | ||
exports.Markdown = exports.default = Markdown; | ||
exports.Markdown = Markdown; | ||
Markdown.parser = _parser.parser; | ||
@@ -189,6 +189,18 @@ Markdown.trans = _trans.default; | ||
function markdown($dom, str, config) { | ||
$dom.innerHTML = ''; | ||
$dom.classList.add('markdown'); | ||
var result = getParseResult(str); | ||
(0, _trans.default)(result.root, this.dom); | ||
(0, _trans.default)(result.root, $dom); | ||
config = getConfig(config); | ||
codeHighlight($dom, config); | ||
} | ||
} | ||
var _default = { | ||
Markdown: Markdown, | ||
parser: _parser.parser, | ||
trans: _trans.default, | ||
codeHighlight: codeHighlight, | ||
getParseResult: getParseResult, | ||
markdown: markdown | ||
}; | ||
exports.default = _default; |
{ | ||
"name": "lys-markdown-parser", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "a js markdown parser", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -98,3 +98,3 @@ import { diffNode } from './diff.js' | ||
export default class Markdown { | ||
class Markdown { | ||
constructor(dom, config, str) { | ||
@@ -127,4 +127,6 @@ this.dom = dom | ||
function markdown($dom, str, config) { | ||
$dom.innerHTML = '' | ||
$dom.classList.add('markdown') | ||
const result = getParseResult(str) | ||
trans(result.root, this.dom) | ||
trans(result.root, $dom) | ||
config = getConfig(config) | ||
@@ -142,1 +144,10 @@ codeHighlight($dom, config) | ||
} | ||
export default { | ||
Markdown, | ||
parser, | ||
trans, | ||
codeHighlight, | ||
getParseResult, | ||
markdown, | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
230653
2877