Skip to content

bug with parsing multiple comments #173

Closed
Closed

Description

@snake

When parsing a rule or csslist, trailing comments (those comments after the rule/list) are consumed as part of a final consumeWhitespace call, meaning we don't see these reported for the next rule in the set (or the next set).

Consider the following cases:

div {/*Find Me!*/left:10px; /*Find Me Too!*/text-align:left;}
Both of these comments should be returned (one for each rule), but the latter is not.

/*Find Me!*/div {left:10px; text-align:left;} /*Find Me Too!*/a {left:10px;}
Both of these comments should be returned (one for each csslist), but the latter is not.

I'd like this fixed so I can use this to parse RTL directives for css rules/lists reliably again. Moodle recently upgraded to 8.3.0 and this broke our RTL.

Please see the linked fix proposal.

Activity

  1. added a commit that references this issue on Nov 4, 2019
    ca5d353
  2. added 6 commits that reference this issue on Aug 24, 2024
    dce07e5
    b7de92c
    edaa39a
    bd773a4
    2b15ee9
    6ccfb21
  3. added 2 commits that reference this issue on Aug 25, 2024
    ddd9ea7
    a855250
  4. added a commit that references this issue on Aug 25, 2024
    e4c66f6
  5. andrewnicols commented on Mar 13, 2025

    @andrewnicols

    This should be reopened as #672 was reverted.

  6. oliverklee commented on Mar 13, 2025

    @oliverklee
    Collaborator

    Indeed, thanks! 🙏 Reopening.

  7. added theissue type on Mar 13, 2025
  8. added 2 commits that reference this issue on Mar 15, 2025
    7b6843e
    11264f9
  9. added 2 commits that reference this issue on Mar 16, 2025
    6f1840d
    915acd5
  10. added a commit that references this issue on Mar 17, 2025
    4870566
  11. added a commit that references this issue on Oct 6, 2025
    6f5a736
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions