mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Ensure that invalid search regexp is correctly highlighted (#28724)
GitOrigin-RevId: f122e2ea649d8cbfa984ddad0b7424aa96bd015a
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ import { FullProjectSearchModifiers } from './full-project-search-modifiers'
|
||||
import { isMac } from '@/shared/utils/os'
|
||||
import { PanelHeading } from '@/shared/components/panel-heading'
|
||||
import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context'
|
||||
import { createRegExp } from '../util/regexp'
|
||||
import { createRegExp } from '@/features/source-editor/utils/regexp'
|
||||
import { useEditorOpenDocContext } from '@/features/ide-react/context/editor-open-doc-context'
|
||||
import { useFileTreePathContext } from '@/features/file-tree/contexts/file-tree-path'
|
||||
import { FullProjectSearchResults } from './full-project-search-results'
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import { SearchQuery } from '@codemirror/search'
|
||||
|
||||
export const createRegExp = (searchQuery: SearchQuery) => {
|
||||
const flags = 'gmu' + (searchQuery.caseSensitive ? '' : 'i')
|
||||
|
||||
return new RegExp(searchQuery.search, flags)
|
||||
}
|
||||
Reference in New Issue
Block a user