move escape-regex to ui/shared

test plan:
  - existing tests pass

flag=none

Change-Id: I5649a6a2f31cea974fac32e9bbff367e0e217007
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316714
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
This commit is contained in:
Aaron Shafovaloff 2023-04-23 14:44:13 -06:00
parent 11a44ad8eb
commit 4555e54ca7
4 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ import _ from 'underscore'
import FilterEntryView from './FilterEntryView'
import EntryCollectionView from './EntryCollectionView'
import EntryCollection from '../collections/EntryCollection'
import rEscape from 'escape-regex'
import rEscape from '@canvas/escape-regex'
export default class DiscussionFilterResultsView extends EntryCollectionView {
static initClass() {

View File

@ -15,6 +15,6 @@
// You should have received a copy of the GNU Affero General Public License along
// with this program. If not, see <http://www.gnu.org/licenses/>.
export default function rEscape(string) {
export default function rEscape(string: string): string {
return string.replace(/[\\\^\$\*\+\?\.\(\)\|\{\}\[\]]/g, '\\$&')
}

View File

@ -1,5 +1,5 @@
{
"name": "escape-regex",
"name": "@canvas/escape-regex",
"private": true,
"version": "1.0.0",
"author": "neme",

View File

@ -16,7 +16,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import rEscape from 'escape-regex'
import rEscape from '@canvas/escape-regex'
const SearchHelpers = {
exactMatchRegex(string) {