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:
parent
11a44ad8eb
commit
4555e54ca7
|
@ -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() {
|
||||
|
|
|
@ -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, '\\$&')
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "escape-regex",
|
||||
"name": "@canvas/escape-regex",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"author": "neme",
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue