Skip to content

fix(evaluate): serialize and parse RegExp values - #3225

Open
Pavel Feldman (pavelfeldman) wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:fix-3188
Open

Pavel Feldman (pavelfeldman) wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:fix-3188

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member

Summary

  • re.Pattern arguments to evaluate() now arrive as a JS RegExp instead of undefined, and returned RegExp values come back as re.Pattern instead of the raw protocol dict.
  • JS-only syntax that re can't compile (e.g. named groups (?<name>…)) falls back to the raw value instead of failing the whole call.

Based on #3189 by FadeHack (@FadeHack).

Fixes #3188

This branch has not been deployed

No deployments
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.

[Bug]: RegExp values are not serialized by evaluate(), and returned RegExps leak internal protocol JSON

2 participants