1
|
{"version":3,"file":"highlight/markdown.js?v=e5155bdcc53e608f4c8c","mappings":"gHAoBA,SAASA,KAAUC,GAEjB,OADeA,EAAKC,KAAKC,IAAMC,OAZjBC,EAYwBF,GAVpB,iBAAPE,EAAwBA,EAE5BA,EAAGD,OAHM,KADlB,IAAgBC,KAY4BC,KAAK,IA4OjDC,EAAOC,QAhOP,SAAkBC,GAChB,MAAMC,EAAc,CAClBC,MAAO,gBACPC,IAAK,IACLC,YAAa,MACbC,UAAW,GAoEPC,EAAO,CACXC,SAAU,CAGR,CACEL,MAAO,iBACPG,UAAW,GAGb,CACEH,MAAO,gEACPG,UAAW,GAEb,CACEH,MAAOX,EAAO,YAfD,0BAe0B,cACvCc,UAAW,GAGb,CACEH,MAAO,wBACPG,UAAW,GAGb,CACEH,MAAO,iBACPG,UAAW,IAGfG,aAAa,EACbC,SAAU,CACR,CACEC,UAAW,SACXL,UAAW,EACXH,MAAO,MACPC,IAAK,MACLQ,cAAc,EACdC,WAAW,GAEb,CACEF,UAAW,OACXL,UAAW,EACXH,MAAO,SACPC,IAAK,MACLQ,cAAc,EACdE,YAAY,GAEd,CACEH,UAAW,SACXL,UAAW,EACXH,MAAO,SACPC,IAAK,MACLQ,cAAc,EACdE,YAAY,KAIZC,EAAO,CACXJ,UAAW,SACXD,SAAU,GACVF,SAAU,CACR,CACEL,MAAO,OACPC,IAAK,QAEP,CACED,MAAO,QACPC,IAAK,WAILY,EAAS,CACbL,UAAW,WACXD,SAAU,GACVF,SAAU,CACR,CACEL,MAAO,WACPC,IAAK,MAEP,CACED,MAAO,SACPC,IAAK,IACLE,UAAW,KAIjBS,EAAKL,SAASO,KAAKD,GACnBA,EAAON,SAASO,KAAKF,GAErB,IAAIG,EAAc,CAChBhB,EACAK,GAuCF,OApCAQ,EAAKL,SAAWK,EAAKL,SAASlB,OAAO0B,GACrCF,EAAON,SAAWM,EAAON,SAASlB,OAAO0B,GAEzCA,EAAcA,EAAY1B,OAAOuB,EAAMC,GAiChC,CACLG,KAAM,WACNC,QAAS,CACP,KACA,SACA,OAEFV,SAAU,CAtCG,CACbC,UAAW,UACXH,SAAU,CACR,CACEL,MAAO,UACPC,IAAK,IACLM,SAAUQ,GAEZ,CACEf,MAAO,uBACPO,SAAU,CACR,CACEP,MAAO,WAET,CACEA,MAAO,IACPC,IAAK,MACLM,SAAUQ,OAuBhBhB,EApKS,CACXS,UAAW,SACXR,MAAO,mCACPC,IAAK,OACLU,YAAY,GAkKVC,EACAC,EAnBe,CACjBL,UAAW,QACXR,MAAO,SACPO,SAAUQ,EACVd,IAAK,KA5LM,CACXO,UAAW,OACXH,SAAU,CAER,CACEL,MAAO,iCAET,CACEA,MAAO,iCAGT,CACEA,MAAO,MACPC,IAAK,aAEP,CACED,MAAO,MACPC,IAAK,aAEP,CACED,MAAO,SAET,CACEA,MAAO,kBAGPO,SAAU,CACR,CACEP,MAAO,cACPC,IAAK,WAGTE,UAAW,KApCO,CACtBH,MAAO,cACPC,IAAK,KAiNHG,EArKmB,CACrBJ,MAAO,eACPM,aAAa,EACbC,SAAU,CACR,CACEC,UAAW,SACXR,MAAO,KACPC,IAAK,KACLQ,cAAc,EACdE,YAAY,GAEd,CACEH,UAAW,OACXR,MAAO,OACPC,IAAK,IACLQ,cAAc","sources":["webpack:///text/node_modules/highlight.js/lib/languages/markdown.js"],"sourcesContent":["/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/*\nLanguage: Markdown\nRequires: xml.js\nAuthor: John Crepezzi <john.crepezzi@gmail.com>\nWebsite: https://daringfireball.net/projects/markdown/\nCategory: common, markup\n*/\n\nfunction markdown(hljs) {\n const INLINE_HTML = {\n begin: /<\\/?[A-Za-z_]/,\n end: '>',\n subLanguage: 'xml',\n relevance: 0\n };\n const HORIZONTAL_RULE = {\n begin: '^[-\\\\*]{3,}',\n end: '$'\n };\n const CODE = {\n className: 'code',\n variants: [\n // TODO: fix to allow these to work with sublanguage also\n {\n begin: '(`{3,})[^`](.|\\\\n)*?\\\\1`*[ ]*'\n },\n {\n begin: '(~{3,})[^~](.|\\\\n)*?\\\\1~*[ ]*'\n },\n // needed to allow markdown as a sublanguage to work\n {\n begin: '```',\n end: '```+[ ]*$'\n },\n {\n begin: '~~~',\n end: '~~~+[ ]*$'\n },\n {\n begin: '`.+?`'\n },\n {\n begin: '(?=^( {4}|\\\\t))',\n // use contains to gobble up multiple lines to allow the block to be whatever size\n // but only have a single open/close tag vs one per line\n contains: [\n {\n begin: '^( {4}|\\\\t)',\n end: '(\\\\n)$'\n }\n ],\n relevance: 0\n }\n ]\n };\n const LIST = {\n className: 'bullet',\n begin: '^[ \\t]*([*+-]|(\\\\d+\\\\.))(?=\\\\s+)',\n end: '\\\\s+',\n excludeEnd: true\n };\n const LINK_REFERENCE = {\n begin: /^\\[[^\\n]+\\]:/,\n returnBegin: true,\n contains: [\n {\n className: 'symbol',\n begin: /\\[/,\n end: /\\]/,\n excludeBegin: true,\n excludeEnd: true\n },\n {\n className: 'link',\n begin: /:\\s*/,\n end: /$/,\n excludeBegin: true\n }\n ]\n };\n const URL_SCHEME = /[A-Za-z][A-Za-z0-9+.-]*/;\n const LINK = {\n variants: [\n // too much like nested array access in so many languages\n // to have any real relevance\n {\n begin: /\\[.+?\\]\\[.*?\\]/,\n relevance: 0\n },\n // popular internet URLs\n {\n begin: /\\[.+?\\]\\(((data|javascript|mailto):|(?:http|ftp)s?:\\/\\/).*?\\)/,\n relevance: 2\n },\n {\n begin: concat(/\\[.+?\\]\\(/, URL_SCHEME, /:\\/\\/.*?\\)/),\n relevance: 2\n },\n // relative urls\n {\n begin: /\\[.+?\\]\\([./?&#].*?\\)/,\n relevance: 1\n },\n // whatever else, lower relevance (might not be a link at all)\n {\n begin: /\\[.+?\\]\\(.*?\\)/,\n relevance: 0\n }\n ],\n returnBegin: true,\n contains: [\n {\n className: 'string',\n relevance: 0,\n begin: '\\\\[',\n end: '\\\\]',\n excludeBegin: true,\n returnEnd: true\n },\n {\n className: 'link',\n relevance: 0,\n begin: '\\\\]\\\\(',\n end: '\\\\)',\n excludeBegin: true,\n excludeEnd: true\n },\n {\n className: 'symbol',\n relevance: 0,\n begin: '\\\\]\\\\[',\n end: '\\\\]',\n excludeBegin: true,\n excludeEnd: true\n }\n ]\n };\n const BOLD = {\n className: 'strong',\n contains: [], // defined later\n variants: [\n {\n begin: /_{2}/,\n end: /_{2}/\n },\n {\n begin: /\\*{2}/,\n end: /\\*{2}/\n }\n ]\n };\n const ITALIC = {\n className: 'emphasis',\n contains: [], // defined later\n variants: [\n {\n begin: /\\*(?!\\*)/,\n end: /\\*/\n },\n {\n begin: /_(?!_)/,\n end: /_/,\n relevance: 0\n }\n ]\n };\n BOLD.contains.push(ITALIC);\n ITALIC.contains.push(BOLD);\n\n let CONTAINABLE = [\n INLINE_HTML,\n LINK\n ];\n\n BOLD.contains = BOLD.contains.concat(CONTAINABLE);\n ITALIC.contains = ITALIC.contains.concat(CONTAINABLE);\n\n CONTAINABLE = CONTAINABLE.concat(BOLD, ITALIC);\n\n const HEADER = {\n className: 'section',\n variants: [\n {\n begin: '^#{1,6}',\n end: '$',\n contains: CONTAINABLE\n },\n {\n begin: '(?=^.+?\\\\n[=-]{2,}$)',\n contains: [\n {\n begin: '^[=-]*$'\n },\n {\n begin: '^',\n end: \"\\\\n\",\n contains: CONTAINABLE\n }\n ]\n }\n ]\n };\n\n const BLOCKQUOTE = {\n className: 'quote',\n begin: '^>\\\\s+',\n contains: CONTAINABLE,\n end: '$'\n };\n\n return {\n name: 'Markdown',\n aliases: [\n 'md',\n 'mkdown',\n 'mkd'\n ],\n contains: [\n HEADER,\n INLINE_HTML,\n LIST,\n BOLD,\n ITALIC,\n BLOCKQUOTE,\n CODE,\n HORIZONTAL_RULE,\n LINK,\n LINK_REFERENCE\n ]\n };\n}\n\nmodule.exports = markdown;\n"],"names":["concat","args","map","x","source","re","join","module","exports","hljs","INLINE_HTML","begin","end","subLanguage","relevance","LINK","variants","returnBegin","contains","className","excludeBegin","returnEnd","excludeEnd","BOLD","ITALIC","push","CONTAINABLE","name","aliases"],"sourceRoot":""}
|