Skip to content

Commit

Permalink
Fix incorrect Quotation in SCSS @functions, Fixes matype#342
Browse files Browse the repository at this point in the history
  • Loading branch information
ronilaukkarinen committed Oct 21, 2020
1 parent eaa3ffd commit f7b3e1b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/formatAtRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ function formatAtRules (root, params) {
atrule.raws.between = ''
}

if (atrule.name === 'warn' || atrule.name === 'error') {
atrule.params = atrule.params.replace(/("|')\s*/g, '"')
atrule.params = atrule.params.replace(/\s*("|')/g, '"')
}
// TODO: Figure out a better way to do this, if needed
// @link https://github.com/morishitter/stylefmt/issues/342
// if (atrule.name === 'warn' || atrule.name === 'error') {
// atrule.params = atrule.params.replace(/("|')\s*/g, '"')
// atrule.params = atrule.params.replace(/\s*("|')/g, '"')
// }

if (atrule.name === 'content') {
atrule.raws.before = '\n' + indentation
Expand Down

0 comments on commit f7b3e1b

Please sign in to comment.