File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
app/src/main/java/com/yangdai/opennote/presentation/screen Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ fun FileScreen(
214
214
withContext(Dispatchers .Default ) {
215
215
searchState = searchState.copy(
216
216
matchCount = if (searchState.searchWord.isNotBlank())
217
- searchState.searchWord.toRegex()
217
+ Regex .escape( searchState.searchWord) .toRegex()
218
218
.findAll(viewModel.contentState.text)
219
219
.count()
220
220
else 0
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ fun NoteScreen(
190
190
withContext(Dispatchers .Default ) {
191
191
searchState = searchState.copy(
192
192
matchCount = if (searchState.searchWord.isNotBlank())
193
- searchState.searchWord.toRegex()
193
+ Regex .escape( searchState.searchWord) .toRegex()
194
194
.findAll(viewModel.contentState.text)
195
195
.count()
196
196
else 0
You can’t perform that action at this time.
0 commit comments