Skip to content
  • John Hawthorn's avatar
    24d16607
    Fix infinite loop in ERBTracker · 24d16607
    John Hawthorn authored
    
    
    When we nest strings inside ERBTracker our earlier regex only finds a
    partial match on the string and then it's possible to have a mismatched
    unmber of brackets. scan_until does not advance the string when it does
    not find a match.
    
    Ultimately, we can't parse Ruby via regex, so this is a best effort. We
    do need to make sure to fail safely.
    
    Co-authored-by: default avatarBreno Gazzola <breno.gazzola@gmail.com>
    24d16607
    Fix infinite loop in ERBTracker
    John Hawthorn authored
    
    
    When we nest strings inside ERBTracker our earlier regex only finds a
    partial match on the string and then it's possible to have a mismatched
    unmber of brackets. scan_until does not advance the string when it does
    not find a match.
    
    Ultimately, we can't parse Ruby via regex, so this is a best effort. We
    do need to make sure to fail safely.
    
    Co-authored-by: default avatarBreno Gazzola <breno.gazzola@gmail.com>
Loading