@sapphire/utilities
Version:
Common JavaScript utilities for the Sapphire Community
18 lines (15 loc) • 565 B
JavaScript
;
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
// src/lib/codeBlock.ts
var zws = String.fromCharCode(8203);
function codeBlock(...args) {
const [language, content] = args.length === 1 ? ["", args[0]] : args;
return `\`\`\`${language}
${String(content).replace(/```/, `\`${zws}\`\``).replace(/`$/g, `\`${zws}`)}
\`\`\``;
}
__name(codeBlock, "codeBlock");
exports.codeBlock = codeBlock;
//# sourceMappingURL=codeBlock.cjs.map
//# sourceMappingURL=codeBlock.cjs.map