Skip to content
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

(PUP-11515) Negative Lookbehind Regex Causes Duplicate Node #9420

Merged
merged 1 commit into from
Aug 1, 2024

Commits on Aug 1, 2024

  1. (PUP-11515) Negative Lookbehind Regex Causes Duplicate Node

    Before this commit, two nodes could collide due to the lookaround
    Regex pattern. This issue arose because the regex was converted to
    a regular string by ignoring characters other than a-z, 0-9, _, and -.
    
    For example, /(?<!a)sync/ was converted to "__node_regexp__async,"
    and /async/ was also converted to "__node_regexp__async," causing
    an error that the node was already defined.
    
    To prevent such duplication, this commit normalize the lookarround
    pattern from the regex, ensuring a unique string in case
    of lookarround pattern conflict.
    
    For example, /(?<!a)sync/ will converted to "__node_regexp__LPQULTEXaRPsync"
    replacing (?<!a) to "LPQULTEXaRP" while converting to the string.
    imaqsood committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    5d09d7f View commit details
    Browse the repository at this point in the history