Fix default langs not being beautified

Currently `<template lang="html">` and `<style lang="css">` are not being beautified.
This commit is contained in:
Giacomo Rizzi 2020-11-04 18:12:08 +01:00 committed by GitHub
parent 41d5051b39
commit 5735852568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

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