Skip to content

Add RegExp.escape#687

Merged
bnoordhuis merged 1 commit intoquickjs-ng:masterfrom
bnoordhuis:regexp-escape
Nov 15, 2024
Merged

Add RegExp.escape#687
bnoordhuis merged 1 commit intoquickjs-ng:masterfrom
bnoordhuis:regexp-escape

Conversation

@bnoordhuis
Copy link
Copy Markdown
Contributor

No description provided.

hex2:
snprintf(s, sizeof(s), "\\x%02x", c);
string_buffer_puts8(b, s);
} else if (is_surrogate(c) || lre_is_white_space(c) || c == 0xFEFF) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

U+FEFF is "Zero Width No-Break Space", which isn't whitespace (Zs) but format (Cf); test262 explicitly tests for it.

@bnoordhuis bnoordhuis merged commit 554907e into quickjs-ng:master Nov 15, 2024
@bnoordhuis bnoordhuis deleted the regexp-escape branch November 15, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants