marked 9.1.5 → 9.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/marked.cjs +7 -3
- package/lib/marked.cjs.map +1 -1
- package/lib/marked.d.cts +2 -2
- package/lib/marked.d.ts +2 -2
- package/lib/marked.esm.js +7 -3
- package/lib/marked.esm.js.map +1 -1
- package/lib/marked.umd.js +7 -3
- package/lib/marked.umd.js.map +1 -1
- package/man/marked.1 +1 -1
- package/marked.min.js +2 -2
- package/package.json +9 -9
package/lib/marked.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* marked v9.1.
|
|
2
|
+
* marked v9.1.6 - a markdown parser
|
|
3
3
|
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
|
|
4
4
|
* https://github.com/markedjs/marked
|
|
5
5
|
*/
|
|
@@ -2052,11 +2052,9 @@ class Marked {
|
|
|
2052
2052
|
parse = this.#parseMarkdown(_Lexer.lex, _Parser.parse);
|
|
2053
2053
|
parseInline = this.#parseMarkdown(_Lexer.lexInline, _Parser.parseInline);
|
|
2054
2054
|
Parser = _Parser;
|
|
2055
|
-
parser = _Parser.parse;
|
|
2056
2055
|
Renderer = _Renderer;
|
|
2057
2056
|
TextRenderer = _TextRenderer;
|
|
2058
2057
|
Lexer = _Lexer;
|
|
2059
|
-
lexer = _Lexer.lex;
|
|
2060
2058
|
Tokenizer = _Tokenizer;
|
|
2061
2059
|
Hooks = _Hooks;
|
|
2062
2060
|
constructor(...args) {
|
|
@@ -2253,6 +2251,12 @@ class Marked {
|
|
|
2253
2251
|
this.defaults = { ...this.defaults, ...opt };
|
|
2254
2252
|
return this;
|
|
2255
2253
|
}
|
|
2254
|
+
lexer(src, options) {
|
|
2255
|
+
return _Lexer.lex(src, options ?? this.defaults);
|
|
2256
|
+
}
|
|
2257
|
+
parser(tokens, options) {
|
|
2258
|
+
return _Parser.parse(tokens, options ?? this.defaults);
|
|
2259
|
+
}
|
|
2256
2260
|
#parseMarkdown(lexer, parser) {
|
|
2257
2261
|
return (src, options) => {
|
|
2258
2262
|
const origOpt = { ...options };
|