Skip to content

scanner: treat trailing reverse solidus as an escape - #25

Open
team-humaki wants to merge 1 commit into
gorilla:mainfrom
team-humaki:escape-eof-code-point
Open

team-humaki wants to merge 1 commit into
gorilla:mainfrom
team-humaki:escape-eof-code-point

Conversation

@team-humaki

Copy link
Copy Markdown

Fixes #14.

A reverse solidus at EOF is a valid escape (CSS Syntax 3 consume-an-escaped-code-point returns U+FFFD). The {escape} production required a following character, so foo\ split into IDENT foo plus CHAR \.

Include \\$ in {escape} so ident/hash tokens keep the trailing escape. Token values stay source text, matching the rest of this scanner.

CSS Syntax 3 treats "\" at EOF as a valid escape (replacement
character). Include it in {escape} so ident/hash tokens are not split.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doesn't support escaped code points?

1 participant