From 153982f98233144de97fca81af4e4ac262ee44a2 Mon Sep 17 00:00:00 2001 From: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Date: Thu, 20 Oct 2022 18:21:33 +0200 Subject: [PATCH] Work around unsupported RegExp lookbehind in WebKit. (#85) * Work around unsupported RegExp lookbehind in WebKit. * Update static/find/find.js Co-authored-by: Mario Carneiro Co-authored-by: Mario Carneiro --- static/find/find.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/static/find/find.js b/static/find/find.js index 8ce5b40..610c8d4 100644 --- a/static/find/find.js +++ b/static/find/find.js @@ -17,14 +17,27 @@ import { DeclarationDataCenter } from "../declaration-data.js"; +function leanFriendlyRegExp(c) { + try { + return new RegExp("(?