diff --git a/src/beautifiers/vue-beautifier.coffee b/src/beautifiers/vue-beautifier.coffee index 814893f..0e09093 100644 --- a/src/beautifiers/vue-beautifier.coffee +++ b/src/beautifiers/vue-beautifier.coffee @@ -12,7 +12,7 @@ module.exports = class VueBeautifier extends Beautifier beautify: (text, language, options) -> return new @Promise((resolve, reject) -> - regexp = /(<(template|script|style)[^>]*>)((\s|\S)*?)<\/\2>/gi + regexp = /(^<(template|script|style)[^>]*>)((\s|\S)*?)^<\/\2>/gim resolve(text.replace(regexp, (match, begin, type, text) -> lang = /lang\s*=\s*['"](\w+)["']/.exec(begin)?[1]