Skip to content

[css-text] Incorrect statement on normalization of newlines #9226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yarusome opened this issue Aug 23, 2023 · 2 comments
Closed

[css-text] Incorrect statement on normalization of newlines #9226

yarusome opened this issue Aug 23, 2023 · 2 comments
Assignees
Labels
Closed Accepted as Editorial css-text-3 Current Work css-text-4 Testing Unnecessary Memory aid - issue doesn't require tests

Comments

@yarusome
Copy link

In 4. White Space Processing & Control Characters (emphases mine):

In the case of HTML, each newline sequence is normalized to a single line feed (U+000A) for representation in the DOM,[…]

However, Infra states that:

To normalize newlines in a string, replace every U+000D CR U+000A LF code point pair with a single U+000A LF code point, and then replace every remaining U+000D CR code point with a U+000A LF code point.

which implies that a sequence of newlines is converted into a sequence of line feeds.

@frivoal
Copy link
Collaborator

frivoal commented Aug 23, 2023

It does seem indeed that HTML invokes that particular definition of normalization, from https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream

@frivoal frivoal self-assigned this Aug 23, 2023
@frivoal frivoal added Agenda+ and removed Agenda+ labels Aug 25, 2023
frivoal added a commit that referenced this issue Aug 26, 2023
…essing

Use HTML and INFRA terminology to make sure we don't imply that multiple
runs of CR/LF together get normalized into LF.

Addresses #9226
@frivoal frivoal added Closed Accepted as Editorial Testing Unnecessary Memory aid - issue doesn't require tests and removed Needs Edits labels Aug 26, 2023
@frivoal frivoal closed this as completed Aug 26, 2023
@frivoal
Copy link
Collaborator

frivoal commented Aug 26, 2023

Fixed in d5c81eb.

Marking as "testing unnecessary", since this clarification is an editorial clarification to an informative remark as far as this spec is concerned, and HTML/INFRA have their own tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Editorial css-text-3 Current Work css-text-4 Testing Unnecessary Memory aid - issue doesn't require tests
Projects
None yet
Development

No branches or pull requests

2 participants