diff options
Diffstat (limited to 'frontend/src/components')
-rw-r--r-- | frontend/src/components/panels/StreamsPane.js | 2 |
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> )); |