You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
11 KiB
JavaScript
25 lines
11 KiB
JavaScript
|
9 months ago
|
"use strict";
|
||
|
|
/*
|
||
|
|
* ATTENTION: An "eval-source-map" devtool has been used.
|
||
|
|
* This devtool is neither made for production nor for readable output files.
|
||
|
|
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||
|
|
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||
|
|
* or disable the default devtool with "devtool: false".
|
||
|
|
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||
|
|
*/
|
||
|
|
exports.id = "vendor-chunks/mdast-util-gfm-strikethrough";
|
||
|
|
exports.ids = ["vendor-chunks/mdast-util-gfm-strikethrough"];
|
||
|
|
exports.modules = {
|
||
|
|
|
||
|
|
/***/ "(ssr)/./node_modules/mdast-util-gfm-strikethrough/lib/index.js":
|
||
|
|
/*!****************************************************************!*\
|
||
|
|
!*** ./node_modules/mdast-util-gfm-strikethrough/lib/index.js ***!
|
||
|
|
\****************************************************************/
|
||
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
||
|
|
|
||
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ gfmStrikethroughFromMarkdown: () => (/* binding */ gfmStrikethroughFromMarkdown),\n/* harmony export */ gfmStrikethroughToMarkdown: () => (/* binding */ gfmStrikethroughToMarkdown)\n/* harmony export */ });\n/* harmony import */ var mdast_util_to_markdown_lib_util_container_phrasing_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mdast-util-to-markdown/lib/util/container-phrasing.js */ \"(ssr)/./node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js\");\n/* harmony import */ var mdast_util_to_markdown_lib_util_track_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mdast-util-to-markdown/lib/util/track.js */ \"(ssr)/./node_modules/mdast-util-to-markdown/lib/util/track.js\");\n/**\n * @typedef {import('mdast').Delete} Delete\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */ \n\n// To do: next major: expose functions.\n// To do: next major: use `state`, state utilities.\n/**\n * List of constructs that occur in phrasing (paragraphs, headings), but cannot\n * contain strikethrough.\n * So they sort of cancel each other out.\n * Note: could use a better name.\n *\n * Note: keep in sync with: <https://github.com/syntax-tree/mdast-util-to-markdown/blob/8ce8dbf/lib/unsafe.js#L14>\n *\n * @type {Array<ConstructName>}\n */ const constructsWithoutStrikethrough = [\n \"autolink\",\n \"destinationLiteral\",\n \"destinationRaw\",\n \"reference\",\n \"titleQuote\",\n \"titleApostrophe\"\n];\nhandleDelete.peek = peekDelete;\n/**\n * Extension for `mdast-util-from-markdown` to enable GFM strikethrough.\n *\n * @type {FromMarkdownExtension}\n */ const gfmStrikethroughFromMarkdown = {\n canContainEols: [\n \"delete\"\n ],\n enter: {\n strikethrough: enterStrikethrough\n },\n exit: {\n strikethrough: exitStrikethrough\n }\n};\n/**\n * Extension for `mdast-util-to-markdown` to enable GFM strikethrough.\n *\n * @type {ToMarkdownExtension}\n */ const gfmStrikethroughToMarkdown = {\n unsafe: [\n {\n character: \"~\",\n inConstruct: \"phrasing\",\n notInConstruct: constructsWithoutStrikethrough\n }\n ],\n handlers: {\n delete: handleDelete\n }\n};\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */ function enterStrikethrough(token) {\n this.enter({\n type: \"delete\",\n children: []\n }, token);\n}\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */ function exitStrikethrough(token) {\n this.exit(token);\n}\n/**\n * @type {ToMarkdownHandle}\n * @param {Delete} node\n */ function handleDelete(node, _, context, safeOptions) {\n const tracker = (0,mdast_util_to_markdown_lib_util_track_js__WEBPACK_IMPORTED_MODULE_0__.track)(safeOptions);\n const exit = context.enter(\"strikethrough\");\n let value = tracker.move(\"~~\");\n value += (0,mdast_util_to_markdown_lib_util_container_phrasing_js__WEBPACK_IMPORTED_MODULE_1__.containerPhrasing)(node, context, {\n ...tracker.current(),\n before: value,\n after: \"~\"\n });\n value += tracker.move(\"~~\");\n exit();\n return value;\n}\n/** @type {ToMarkdownHandle} */ function peekDelete() {\n return \"~\";\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHNzcikvLi9ub2RlX21vZHVsZXMvbWRhc3QtdXRpbC1nZm0tc3RyaWtldGhyb3VnaC9saWIvaW5kZXguanMiLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBOzs7Ozs7Ozs7O0NBVUMsR0FFc0Y7QUFDekI7QUFFOUQsdUNBQXVDO0FBQ3ZDLG1
|
||
|
|
|
||
|
|
/***/ })
|
||
|
|
|
||
|
|
};
|
||
|
|
;
|