mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-18 15:00:13 +01:00
Update markdownlint-micromark dependency to 0.1.7, incorporate micromark-extension-math into parse (and compile for demo page).
This commit is contained in:
parent
de2922a8eb
commit
3945de161e
4 changed files with 15 additions and 6 deletions
|
|
@ -44,7 +44,8 @@
|
||||||
"extensions": [
|
"extensions": [
|
||||||
micromark.gfmAutolinkLiteral(),
|
micromark.gfmAutolinkLiteral(),
|
||||||
micromark.gfmFootnote(),
|
micromark.gfmFootnote(),
|
||||||
micromark.gfmTable()
|
micromark.gfmTable(),
|
||||||
|
micromark.math()
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
const context = micromark.parse(parseOptions);
|
const context = micromark.parse(parseOptions);
|
||||||
|
|
@ -55,7 +56,8 @@
|
||||||
"htmlExtensions": [
|
"htmlExtensions": [
|
||||||
micromarkHtml.gfmAutolinkLiteralHtml(),
|
micromarkHtml.gfmAutolinkLiteralHtml(),
|
||||||
micromarkHtml.gfmFootnoteHtml(),
|
micromarkHtml.gfmFootnoteHtml(),
|
||||||
micromarkHtml.gfmTableHtml()
|
micromarkHtml.gfmTableHtml(),
|
||||||
|
micromarkHtml.mathHtml()
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return micromarkHtml.compile(compileOptions)(events);
|
return micromarkHtml.compile(compileOptions)(events);
|
||||||
|
|
|
||||||
|
|
@ -1364,6 +1364,7 @@ var _require = __webpack_require__(/*! markdownlint-micromark */ "markdownlint-m
|
||||||
gfmAutolinkLiteral = _require.gfmAutolinkLiteral,
|
gfmAutolinkLiteral = _require.gfmAutolinkLiteral,
|
||||||
gfmFootnote = _require.gfmFootnote,
|
gfmFootnote = _require.gfmFootnote,
|
||||||
gfmTable = _require.gfmTable,
|
gfmTable = _require.gfmTable,
|
||||||
|
math = _require.math,
|
||||||
parse = _require.parse,
|
parse = _require.parse,
|
||||||
postprocess = _require.postprocess,
|
postprocess = _require.postprocess,
|
||||||
preprocess = _require.preprocess;
|
preprocess = _require.preprocess;
|
||||||
|
|
@ -1394,7 +1395,7 @@ function getMicromarkEvents(markdown) {
|
||||||
var refsDefined = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
var refsDefined = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
||||||
// Customize options object to add useful extensions
|
// Customize options object to add useful extensions
|
||||||
options.extensions = options.extensions || [];
|
options.extensions = options.extensions || [];
|
||||||
options.extensions.push(gfmAutolinkLiteral(), gfmFootnote(), gfmTable());
|
options.extensions.push(gfmAutolinkLiteral(), gfmFootnote(), gfmTable(), math());
|
||||||
|
|
||||||
// Use micromark to parse document into Events
|
// Use micromark to parse document into Events
|
||||||
var encoding = undefined;
|
var encoding = undefined;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const {
|
const {
|
||||||
gfmAutolinkLiteral, gfmFootnote, gfmTable, parse, postprocess, preprocess
|
gfmAutolinkLiteral, gfmFootnote, gfmTable, math, parse, postprocess,
|
||||||
|
preprocess
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
} = require("markdownlint-micromark");
|
} = require("markdownlint-micromark");
|
||||||
|
|
||||||
|
|
@ -33,7 +34,12 @@ function getMicromarkEvents(markdown, options = {}, refsDefined = true) {
|
||||||
|
|
||||||
// Customize options object to add useful extensions
|
// Customize options object to add useful extensions
|
||||||
options.extensions = options.extensions || [];
|
options.extensions = options.extensions || [];
|
||||||
options.extensions.push(gfmAutolinkLiteral(), gfmFootnote(), gfmTable());
|
options.extensions.push(
|
||||||
|
gfmAutolinkLiteral(),
|
||||||
|
gfmFootnote(),
|
||||||
|
gfmTable(),
|
||||||
|
math()
|
||||||
|
);
|
||||||
|
|
||||||
// Use micromark to parse document into Events
|
// Use micromark to parse document into Events
|
||||||
const encoding = undefined;
|
const encoding = undefined;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"markdown-it": "13.0.1",
|
"markdown-it": "13.0.1",
|
||||||
"markdownlint-micromark": "0.1.6"
|
"markdownlint-micromark": "0.1.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.22.9",
|
"@babel/core": "7.22.9",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue