first
This commit is contained in:
32
node_modules/@mdit/helper/dist/index.d.ts
generated
vendored
Normal file
32
node_modules/@mdit/helper/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
//#region src/dedent.d.ts
|
||||
/**
|
||||
* Removes common leading whitespace from each line in the given text.
|
||||
*
|
||||
* @param text The text to dedent.
|
||||
* @returns The dedented text.
|
||||
*/
|
||||
declare const dedent: (text: string) => string;
|
||||
//#endregion
|
||||
//#region src/escape.d.ts
|
||||
/**
|
||||
* Escapes html content
|
||||
*
|
||||
* @param unsafeHTML The html content to escape.
|
||||
* @returns The escaped html content.
|
||||
*/
|
||||
declare const escapeHtml: (unsafeHTML: string) => string;
|
||||
/**
|
||||
* Escapes special characters in string s such that the string
|
||||
* can be used in `new RegExp`. For example "[" becomes "\\[".
|
||||
*
|
||||
* @param regexp The string to escape.
|
||||
* @returns The escaped string.
|
||||
*/
|
||||
declare const escapeRegExp: (regexp: string) => string;
|
||||
//#endregion
|
||||
//#region src/reg.d.ts
|
||||
declare const NEWLINE_RE: RegExp;
|
||||
declare const UNESCAPE_RE: RegExp;
|
||||
//#endregion
|
||||
export { NEWLINE_RE, UNESCAPE_RE, dedent, escapeHtml, escapeRegExp };
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/@mdit/helper/dist/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@mdit/helper/dist/index.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/dedent.ts","../src/escape.ts","../src/reg.ts"],"mappings":";;AAMA;;;;;cAAa,MAAA,GAAU,IAAA;;;;AAAvB;;;;;cCGa,UAAA,GAAc,UAAA;;;AAA3B;;;;;cAiBa,YAAA,GAAgB,MAAA;;;cCzBhB,UAAA,EAAY,MAAA;AAAA,cAEZ,WAAA,EAAa,MAAA"}
|
||||
4
node_modules/@mdit/helper/dist/index.js
generated
vendored
Normal file
4
node_modules/@mdit/helper/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
const e=e=>{let t=e.split(`
|
||||
`),n=t.reduce((e,t)=>{for(let n=0;n<t.length;n++)if(t[n]!==` `&&t[n]!==` `)return Math.min(n,e);return e},1/0);return n<1/0?t.map(e=>e.slice(n)).join(`
|
||||
`):e},t=/[-/\\^$*+?.()|[\]{}]/g,n=String.raw`\$&`,r=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`),i=e=>e.replaceAll(t,n),a=/\r\n?|\n/g,o=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/gu;export{a as NEWLINE_RE,o as UNESCAPE_RE,e as dedent,r as escapeHtml,i as escapeRegExp};
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@mdit/helper/dist/index.js.map
generated
vendored
Normal file
1
node_modules/@mdit/helper/dist/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","names":[],"sources":["../src/dedent.ts","../src/escape.ts","../src/reg.ts"],"sourcesContent":["/**\n * Removes common leading whitespace from each line in the given text.\n *\n * @param text The text to dedent.\n * @returns The dedented text.\n */\nexport const dedent = (text: string): string => {\n const lines = text.split(\"\\n\");\n\n const minIndentLength = lines.reduce((acc, line) => {\n for (let i = 0; i < line.length; i++)\n if (line[i] !== \" \" && line[i] !== \"\\t\") return Math.min(i, acc);\n\n return acc;\n }, Infinity);\n\n if (minIndentLength < Infinity)\n return lines.map((line) => line.slice(minIndentLength)).join(\"\\n\");\n\n return text;\n};\n","const ESCAPE_REGEXP = /[-/\\\\^$*+?.()|[\\]{}]/g;\nconst REPLACE_WITH = String.raw`\\$&`;\n\n/**\n * Escapes html content\n *\n * @param unsafeHTML The html content to escape.\n * @returns The escaped html content.\n */\nexport const escapeHtml = (unsafeHTML: string): string =>\n unsafeHTML\n .replaceAll(\"&\", \"&\")\n .replaceAll(\"<\", \"<\")\n .replaceAll(\">\", \">\")\n .replaceAll('\"', \""\")\n .replaceAll(\"'\", \"'\");\n\n/**\n * Escapes special characters in string s such that the string\n * can be used in `new RegExp`. For example \"[\" becomes \"\\\\[\".\n *\n * @param regexp The string to escape.\n * @returns The escaped string.\n */\n// NOTE: This should be a bug of oxlint\n// oxlint-disable-next-line jsdoc/require-param, jsdoc/require-returns\nexport const escapeRegExp = (regexp: string): string =>\n regexp.replaceAll(ESCAPE_REGEXP, REPLACE_WITH);\n","// https://spec.commonmark.org/0.29/#line-ending\nexport const NEWLINE_RE: RegExp = /\\r\\n?|\\n/g;\n\nexport const UNESCAPE_RE: RegExp = /\\\\([ \\\\!\"#$%&'()*+,./:;<=>?@[\\]^_`{|}~-])/gu;\n"],"mappings":"AAMA,MAAa,EAAU,GAAyB,CAC9C,IAAM,EAAQ,EAAK,MAAM;EAAK,CAExB,EAAkB,EAAM,QAAQ,EAAK,IAAS,CAClD,IAAK,IAAI,EAAI,EAAG,EAAI,EAAK,OAAQ,IAC/B,GAAI,EAAK,KAAO,KAAO,EAAK,KAAO,IAAM,OAAO,KAAK,IAAI,EAAG,EAAI,CAElE,OAAO,GACN,IAAS,CAKZ,OAHI,EAAkB,IACb,EAAM,IAAK,GAAS,EAAK,MAAM,EAAgB,CAAC,CAAC,KAAK;EAAK,CAE7D,GCnBH,EAAgB,wBAChB,EAAe,OAAO,GAAG,MAQlB,EAAc,GACzB,EACG,WAAW,IAAK,QAAQ,CACxB,WAAW,IAAK,OAAO,CACvB,WAAW,IAAK,OAAO,CACvB,WAAW,IAAK,SAAS,CACzB,WAAW,IAAK,QAAQ,CAWhB,EAAgB,GAC3B,EAAO,WAAW,EAAe,EAAa,CC1BnC,EAAqB,YAErB,EAAsB"}
|
||||
Reference in New Issue
Block a user