Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/regexp-string-matcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import escapeStringRegexp from "escape-string-regexp";
import { isRegExpString, parseRegExpString } from "./regexp-parse";
import toRegex from "to-regex";

const DEFAULT_FLAGS = "g";
const DEFAULT_FLAGS = "ug";

const defaultFlags = (flagsString: string) => {
if (flagsString.length === 0) {
Expand Down
3 changes: 3 additions & 0 deletions test/snapshots/unicode-by-default-regexp/input-patterns.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"/\uD834\uDF06{3}/"
]
1 change: 1 addition & 0 deletions test/snapshots/unicode-by-default-regexp/input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
𝌆𝌆𝌆
11 changes: 11 additions & 0 deletions test/snapshots/unicode-by-default-regexp/output-for-human.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

- match text: **𝌆𝌆𝌆**
- captures: **[]**
- startIndex: **0**
- endIndex: **6**

```
**𝌆𝌆𝌆**

```

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"match": "𝌆𝌆𝌆",
"captures": [],
"startIndex": 0,
"endIndex": 6
}
]