Skip to content

Conversation

jgerigmeyer
Copy link
Member

Copy link

@jamesnw jamesnw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read through the code, and the changes look good. A few questions, but nothing blocking!

const parseAssertion: Parser = function (rule, ctx) {
if (isCommentNode(rule)) {
const text = rule.comment?.trimStart();
const text = rule.text.trim();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changing from trimStart() to trim(). Would this account for the difference in https://github.com/oddbird/true/pull/314/files#r2176052308?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No -- PostCSS automatically trims the whitespace from comments, and stores the original whitespace in rule.raws.left and rule.raws.right. So I think this trim() isn't really needed, but it also doesn't hurt.

passed: true,
output:
'/* Some loud comment */\n\n.test-output {\n -property: value;\n}',
'/* Some loud comment */\n.test-output {\n -property: value;\n}',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a breaking change? Or just an internal change that won't impact users?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is internal, and shouldn't impact users.

@jgerigmeyer
Copy link
Member Author

@mirisuzanne Does this look okay to you? If so, I might do an alpha release so that users can test it.

Copy link
Member

@mirisuzanne mirisuzanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jgerigmeyer I don't know most of the internals here, but if the tests pass, it looks fine to me. :)

@jgerigmeyer jgerigmeyer merged commit 13b0fc8 into main Jul 1, 2025
3 checks passed
@jgerigmeyer jgerigmeyer deleted the postcss branch July 1, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sass-true fails to parse non-standard at-rules
3 participants