From 8491d5d9aedbb8855e261b9592df8a8ec81b0e5d Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Mon, 23 Aug 2021 22:50:57 +0200 Subject: Fix rules highlighting in frontend --- frontend/src/components/panels/StreamsPane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'frontend/src/components/panels') diff --git a/frontend/src/components/panels/StreamsPane.js b/frontend/src/components/panels/StreamsPane.js index 8276949..82efd88 100644 --- a/frontend/src/components/panels/StreamsPane.js +++ b/frontend/src/components/panels/StreamsPane.js @@ -145,7 +145,7 @@ class StreamsPane extends Component { pattern["dot_all"] && (flags += "s"); pattern["multi_line"] && (flags += "m"); pattern["unicode_property"] && (flags += "u"); - const regex = new RegExp("(" + pattern.regex + ")", flags); + const regex = new RegExp(pattern.regex.replace(/^\//, '(').replace(/\/$/, ')'), flags); streamContent = reactStringReplace(streamContent, regex, (match, i) => ( {match} )); -- cgit v1.2.3-70-g09d2