insights: Syntax highlighting shouldn't highlight regexp unless it's been set as a regexp
View options
- Truncate descriptions
Created by: Joelkw
In Sourcegraph search bar, the following cases occur:
Notice how the regexp characters are only given syntax highlighting if you set it to be patternType:regexp
.
But in our creation form for code insights:
We highlight regexp syntax in both cases, even though only the latter is actually a valid regexp patternType. Even more confusingly (even worse), we also give them regexp tooltips when it's not actually set to regexp:
This confuses users because they think that it's valid, when it's not – they still need to use the regexp.
Even if we don't implement #29645 , we should ensure syntax highlighting matches the correct patternType:
.

