Prevent empty highlights (#728)

This commit is contained in:
QuiteQuiet
2016-06-16 03:37:49 +02:00
committed by Guangcong Luo
parent 1f57fbf842
commit 0e69fc76fd

View File

@@ -658,6 +658,7 @@
switch (targets[0]) {
case 'add':
for (var i = 1, len = targets.length; i < len; i++) {
if (!targets[i]) continue;
if (/[\\^$*+?()|{}[\]]/.test(targets[i])) {
// Catch any errors thrown by newly added regular expressions so they don't break the entire highlight list
try {