mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 15:57:50 +02:00
Don't use stripIndent at all in beautify
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { js_beautify: beautify } = require('js-beautify');
|
||||
const { stripIndent } = require('common-tags');
|
||||
|
||||
module.exports = class BeautifyCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -22,10 +21,6 @@ module.exports = class BeautifyCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg, { code }) {
|
||||
return msg.reply(stripIndent`
|
||||
\`\`\`${code.lang || 'js'}
|
||||
${beautify(code.code)}
|
||||
\`\`\`
|
||||
`);
|
||||
return msg.reply(`\`\`\`${code.lang || 'js'}\n${beautify(code.code)}\n\`\`\``);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user