Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(regular_expression): Fixed control Y regular expression
  • Loading branch information
tapanprakasht committed Oct 13, 2024
commit 27b1f14558c22c7343188a03ea83cbf3a050621c
2 changes: 2 additions & 0 deletions crates/oxc_regular_expression/src/ast_impl/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ fn character_to_string(
'\n' => r"\cJ".to_string(),
'\r' => r"\cM".to_string(),
'\t' => r"\cI".to_string(),
'\u{0019}' => r"\cY".to_string(),
_ => format!(r"\c{ch}"),
},
CharacterKind::Identifier => {
Expand Down Expand Up @@ -482,6 +483,7 @@ mod test {
(r"/\d/g", None),
("/abcd/igv", Some("/abcd/igv")),
(r"/\d/ug", Some(r"/\d/ug")),
(r"/\cY/", None),
// we capitalize hex unicodes.
(r"/\n\cM\0\x41\u{1f600}\./u", Some(r"/\n\cM\0\x41\u{1F600}\./u")),
(r"/\u02c1/u", Some(r"/\u02C1/u")),
Expand Down