From facde6580480a13875120f5d8fb7d8f53d7697c5 Mon Sep 17 00:00:00 2001 From: rzvxa <3788964+rzvxa@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:14:56 +0330 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Yuji Sugiura <6259812+leaysgur@users.noreply.github.com> --- crates/oxc_regular_expression/src/display.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/oxc_regular_expression/src/display.rs b/crates/oxc_regular_expression/src/display.rs index 018fcec30009c8..88f27f79d834ec 100644 --- a/crates/oxc_regular_expression/src/display.rs +++ b/crates/oxc_regular_expression/src/display.rs @@ -84,8 +84,8 @@ impl Display for BoundaryAssertionKind { match self { Self::Start => write!(f, "^"), Self::End => write!(f, "$"), - Self::Boundary => write!(f, "\\b"), - Self::NegativeBoundary => write!(f, "\\B"), + Self::Boundary => write!(f, r"\b"), + Self::NegativeBoundary => write!(f, r"\B"), } } } @@ -287,7 +287,7 @@ impl Display for IndexedReference { impl<'a> Display for NamedReference<'a> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "\\k{}", self.name) + write!(f, r"\k<{}>", self.name) } }