Skip to content

Commit

Permalink
chore: improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bushuai committed Mar 4, 2025
1 parent bb52ad5 commit 8a8c992
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ var cyrillicChars = /[\u200E\u2066-\u2069]/gu;
/[\u0300-\u0302]/;

// 2.The hyphen is treated as literal character in the character class
// This regex is valid, it will match either '\u0300' or a literal hyphen '-'
// This regex is valid, it will match '\u0300' or a literal hyphen '-'
/[\u0300-]/;

// 3. The hyphen is treated as a literal character outside a character class
// This regex will match a literal "\u0300-\u0302"
// This regex will match "\u0300-\u0302"
/\u0300-\u0302/;
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var cyrillicChars = /[\u200E\u2066-\u2069]/gu;
/[\u0300-]/;

// 3. The hyphen is treated as a literal character outside a character class
// This regex will match a literal "\u0300-\u0302"
// This regex will match "\u0300-\u0302"
/\u0300-\u0302/;

```

0 comments on commit 8a8c992

Please sign in to comment.