Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add RegExp.escape #687

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Add RegExp.escape #687

merged 1 commit into from
Nov 15, 2024

Conversation

bnoordhuis
Copy link
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
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
47 checks passed
@bnoordhuis bnoordhuis deleted the regexp-escape branch November 15, 2024 11:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants