Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Fix bug with +
  • Loading branch information
philipp-spiess committed Nov 19, 2024
commit 108e84d755d4ef16c21ebc04bc3269199738904c
8 changes: 8 additions & 0 deletions packages/tailwindcss/src/compat/selector-parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ describe('parse', () => {
])
})

it('should handle next-children combinator', () => {
expect(parse('.foo + p')).toEqual([
{ kind: 'selector', value: '.foo' },
{ kind: 'combinator', value: ' + ' },
{ kind: 'selector', value: 'p' },
])
})

it('should handle escaped characters', () => {
expect(parse('foo\\.bar')).toEqual([{ kind: 'selector', value: 'foo\\.bar' }])
})
Expand Down
1 change: 1 addition & 0 deletions packages/tailwindcss/src/compat/selector-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export function parse(input: string) {
peekChar !== GREATER_THAN &&
peekChar !== NEWLINE &&
peekChar !== SPACE &&
peekChar !== PLUS &&
peekChar !== TAB &&
peekChar !== TILDE
) {
Expand Down