aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components
diff options
context:
space:
mode:
authorEmiliano Ciavatta2021-08-23 20:50:57 +0000
committerEmiliano Ciavatta2021-08-23 20:50:57 +0000
commit8491d5d9aedbb8855e261b9592df8a8ec81b0e5d (patch)
tree2be118fdf6e8ba257492c8ef174ab7cf60a2dc6e /frontend/src/components
parentdded53f3450b41b358674ea41e9f078fb0d4391f (diff)
Fix rules highlighting in frontend
Diffstat (limited to 'frontend/src/components')
-rw-r--r--frontend/src/components/panels/StreamsPane.js2
1 files changed, 1 insertions, 1 deletions
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) => (
<span key={i} className="matched-occurrence" style={{"backgroundColor": rule.color}}>{match}</span>
));