summaryrefslogtreecommitdiff
path: root/node_modules/@sapphire/utilities/dist/lib/codeBlock.mjs.map
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@sapphire/utilities/dist/lib/codeBlock.mjs.map')
-rw-r--r--node_modules/@sapphire/utilities/dist/lib/codeBlock.mjs.map1
1 files changed, 1 insertions, 0 deletions
diff --git a/node_modules/@sapphire/utilities/dist/lib/codeBlock.mjs.map b/node_modules/@sapphire/utilities/dist/lib/codeBlock.mjs.map
new file mode 100644
index 0000000..52ccacd
--- /dev/null
+++ b/node_modules/@sapphire/utilities/dist/lib/codeBlock.mjs.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../src/lib/codeBlock.ts"],"names":[],"mappings":";;;;;AAAA,IAAM,MAAM,OAAO,aAAa,IAAI;AA4B7B,SAAS,aAAa,MAAiC;AAC7D,QAAM,CAAC,UAAU,OAAO,IAAI,KAAK,WAAW,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;AAChE,SAAO,SAAS;AAAA,EAAa,OAAO,OAAO,EAAE,QAAQ,OAAO,KAAK,SAAS,EAAE,QAAQ,OAAO,KAAK,KAAK;AAAA;AACtG;AAHgB","sourcesContent":["const zws = String.fromCharCode(8203);\n\n/**\n * Wraps the content inside a codeblock with no language\n *\n * @remark If the provided content includes 3 backticks (```) then those backticks will be escaped\n * by adding a [Zero Width Space](https://en.wikipedia.org/wiki/Zero-width_space) between the first and second backtick\n *\n * @remark If the provided content ends with a backtick then a [Zero Width Space](https://en.wikipedia.org/wiki/Zero-width_space) will be added\n * to the end of the content\n *\n * @param content - The content to wrap\n */\nexport function codeBlock<C extends string>(content: C): `\\`\\`\\`\\n${C}\\n\\`\\`\\``;\n\n/**\n * Wraps the content inside a codeblock with the specified language\n *\n * @remark If the provided content includes 3 backticks (```) then those backticks will be escaped\n * by adding a [Zero Width Space](https://en.wikipedia.org/wiki/Zero-width_space) between the first and second backtick\n *\n * @remark If the provided content ends with a backtick then a [Zero Width Space](https://en.wikipedia.org/wiki/Zero-width_space) will be added\n * to the end of the content\n *\n * @param language The codeblock language\n * @param content The expression to be wrapped in the codeblock\n */\nexport function codeBlock<L extends string, C extends string>(language: L, content: C): `\\`\\`\\`${L}\\n${C}\\n\\`\\`\\``;\nexport function codeBlock(...args: [string, string?]): string {\n\tconst [language, content] = args.length === 1 ? ['', args[0]] : args;\n\treturn `\\`\\`\\`${language}\\n${String(content).replace(/```/, `\\`${zws}\\`\\``).replace(/`$/g, `\\`${zws}`)}\\n\\`\\`\\``;\n}\n"]} \ No newline at end of file