Skip to content

Commit

Permalink
Merge pull request #46 from kristerkari/bugfix/charset
Browse files Browse the repository at this point in the history
Fix @charset formatting
  • Loading branch information
Masaaki Morishita committed Dec 28, 2015
2 parents da1bca9 + aa83d5f commit 0b2fc69
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/formatAtRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function formatAtRules (root) {
atrule.raws.afterName = ' '


if (atrule.name === 'import') {
if (atrule.name === 'import' || atrule.name === 'charset') {
atrule.raws.between = ''
}

Expand Down
1 change: 1 addition & 0 deletions test/fixtures/charset-2.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@charset "utf-8" ;
1 change: 1 addition & 0 deletions test/fixtures/charset-2.out.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@charset "utf-8";
1 change: 1 addition & 0 deletions test/fixtures/charset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@charset "utf-8";
1 change: 1 addition & 0 deletions test/fixtures/charset.out.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@charset "utf-8";
2 changes: 2 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ test('vendor-prefix')
test('nested-atrule')
test('font-face')
test('import')
test('charset')
test('charset-2')
test('pseudo-element')
test('at-media')

Expand Down

0 comments on commit 0b2fc69

Please sign in to comment.