Merge pull request #1577 from kaven276/vue-sections-fix

vue section mark right
This commit is contained in:
Glavin Wiechert 2017-04-15 02:35:49 -03:00 committed by GitHub
commit 40a07b29e9
1 changed files with 1 additions and 1 deletions

View File

@ -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]