Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ export function format(css, { minify = false } = {}) {

if (prelude.type === TYPE_SELECTORLIST) {
buffer = print_selectorlist(prelude)
} else {
// In case parsing the selector list fails we'll print it as-is
buffer = print_unknown(prelude, indent_level)
}

if (block.type === TYPE_BLOCK) {
Expand Down
12 changes: 12 additions & 0 deletions test/selectors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,16 @@ li:nth-child() {}`
assert.equal(actual, expected)
})

test('formats unknown pseudos correctly', () => {
let actual = format(`
::foo-bar,
:unkown-thing(),
:unnowkn(kjsa.asddk,asd) {}
`)
let expected = `::foo-bar,
:unkown-thing(),
:unnowkn(kjsa.asddk,asd) {}`
assert.equal(actual, expected)
})

test.run()
Loading