Fix default langs not being beautified
Currently `<template lang="html">` and `<style lang="css">` are not being beautified.
This commit is contained in:
parent
41d5051b39
commit
5735852568
|
@ -23,7 +23,7 @@ module.exports = class VueBeautifier extends Beautifier
|
||||||
switch lang
|
switch lang
|
||||||
when "pug", "jade"
|
when "pug", "jade"
|
||||||
require("pug-beautify")(text, options)
|
require("pug-beautify")(text, options)
|
||||||
when undefined
|
when "html", undefined
|
||||||
require("js-beautify").html(text, options)
|
require("js-beautify").html(text, options)
|
||||||
else
|
else
|
||||||
undefined
|
undefined
|
||||||
|
@ -45,7 +45,7 @@ module.exports = class VueBeautifier extends Beautifier
|
||||||
mode: "beautify"
|
mode: "beautify"
|
||||||
)
|
)
|
||||||
prettydiff(options)
|
prettydiff(options)
|
||||||
when undefined
|
when "css", undefined
|
||||||
require("js-beautify").css(text, options)
|
require("js-beautify").css(text, options)
|
||||||
else
|
else
|
||||||
undefined
|
undefined
|
||||||
|
|
Loading…
Reference in New Issue