vue section mark right

This commit is contained in:
Li Yong 2017-03-31 15:06:00 +08:00
parent cfe0e6ad8e
commit f9d643cc5f
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,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]