From 34042519f47492a9041e071556a18b8999858cbc Mon Sep 17 00:00:00 2001 From: kozbial Date: Thu, 29 Jul 2021 15:00:44 -0700 Subject: [PATCH] Add regex lookarounds to check for require overlaps --- scripts/goog_module/convert-file.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/goog_module/convert-file.sh b/scripts/goog_module/convert-file.sh index 1c5b92fc8..4f433e428 100755 --- a/scripts/goog_module/convert-file.sh +++ b/scripts/goog_module/convert-file.sh @@ -151,7 +151,12 @@ getPropertiesAccessed() { # Detect if there was any overlap. if [[ -n "${requires_overlap}" ]]; then while read -r requires_overlap_prop; do - properties_accessed=$(echo "${properties_accessed}" | perl -pe 's/'"${requires_overlap_prop}"'//g') + # Replace any instances of $requires_overlap_prop. Includes regex + # lookarounds so that it does not simply match string contains. + # Ex: if $requires_overlap is "Svg", then it would update the list + # "isTargetInput mouseToSvg noEvent Svg" to + # "isTargetInput mouseToSvg noEvent " (note that mouseToSvg is unchanged). + properties_accessed=$(echo "${properties_accessed}" | perl -pe 's/(?