Skip to content

[BUGFIX] Include comments for all rules in declaration block #1182

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

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

JakeQZ
Copy link
Contributor

@JakeQZ JakeQZ commented Mar 16, 2025

This is the v8.x backport of #1169.

  • Rule::parse() will no longer consume anything after the semicolon terminating the rule - it does not belong to that rule;
  • The whitespace and comments before a rule will be processed by RuleSet::parseRuleSet() and passed as a parameter to Rule::parse() -
    • This is only required while 'strict mode' parsing is an option, to avoid having an exception thrown during normal operation (i.e. when Rule::parse() encounters normal } as opposed to some other junk, which is not distinguished).

Fixes #173.
See also #663, #672, #741.

This is the v8.x backport of #1169.

- `Rule::parse()` will no longer consume anything after the semicolon
  terminating the rule - it does not belong to that rule;
- The whitespace and comments before a rule will be processed by
  `RuleSet::parseRuleSet()` and passed as a parameter to `Rule::parse()` -
  - This is only required while 'strict mode' parsing is an option,
    to avoid having an exception thrown during normal operation
    (i.e. when `Rule::parse()` encounters normal `}`
    as opposed to some other junk, which is not distinguished).

Fixes #173.
See also #663, #672, #741.
@oliverklee oliverklee merged commit 4870566 into v8.x Mar 17, 2025
22 checks passed
@oliverklee oliverklee deleted the bugfix/8.x/ruleset-comments branch March 17, 2025 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants