From 69aefcd1cb9cdfa83f40eb3a4a697ca101503241 Mon Sep 17 00:00:00 2001 From: Aidi Stan Date: Thu, 18 Aug 2016 13:23:15 +0800 Subject: [PATCH] Fix Sass beautification and close #1088 - Remove the incomplete Sass support provided by Pretty Diff and CSScomb - Change the default beautifier of Sass to SassConvert --- README.md | 2 +- src/beautifiers/csscomb.coffee | 1 - src/beautifiers/prettydiff.coffee | 3 +-- src/languages/sass.coffee | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 612e10f..5138f1e 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ See [all supported options in the documentation at `docs/options.md`](https://g | Riot.js | `Riot.js`, `HTML (Riot Tag)` |`.tag` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | Ruby | `Ruby`, `Ruby on Rails` |`.rb` | [`Rubocop`](https://github.com/bbatsov/rubocop) (Default), [`Ruby Beautify`](https://github.com/erniebrodeur/ruby-beautify) | | Rust | `Rust` |`.rs`, `.rlib` | [`rustfmt`](https://github.com/nrc/rustfmt) (Default) | -| Sass | `Sass` |`.sass` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | +| Sass | `Sass` |`.sass` | [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) (Default) | | SCSS | `SCSS` |`.scss` | [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | Spacebars | `Spacebars` | | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) | | SQL | `SQL (Rails)`, `SQL` |`.sql` | [`sqlformat`](https://github.com/andialbrecht/sqlparse) (Default) | diff --git a/src/beautifiers/csscomb.coffee b/src/beautifiers/csscomb.coffee index aad65f5..b8aed15 100644 --- a/src/beautifiers/csscomb.coffee +++ b/src/beautifiers/csscomb.coffee @@ -12,7 +12,6 @@ module.exports = class JSBeautify extends Beautifier predefinedConfig: true CSS: true LESS: true - Sass: true SCSS: true } diff --git a/src/beautifiers/prettydiff.coffee b/src/beautifiers/prettydiff.coffee index 9dde689..0e37f03 100644 --- a/src/beautifiers/prettydiff.coffee +++ b/src/beautifiers/prettydiff.coffee @@ -55,7 +55,6 @@ module.exports = class PrettyDiff extends Beautifier JavaScript: true CSS: true SCSS: true - Sass: true JSON: true TSS: true Twig: true @@ -103,7 +102,7 @@ module.exports = class PrettyDiff extends Beautifier lang = "css" when "LESS" lang = "less" - when "SCSS", "Sass" + when "SCSS" lang = "scss" when "TSS" lang = "tss" diff --git a/src/languages/sass.coffee b/src/languages/sass.coffee index 03e49ca..d595474 100644 --- a/src/languages/sass.coffee +++ b/src/languages/sass.coffee @@ -2,7 +2,7 @@ module.exports = { name: "Sass" namespace: "sass" - fallback: ['css', 'scss'] + fallback: ['css'] ### Supported Grammars @@ -18,6 +18,6 @@ module.exports = { "sass" ] - defaultBeautifier: "Pretty Diff" + defaultBeautifier: "SassConvert" }