nano unhighlight string if a quote is escaped
0
votes
1
answer
84
views
I'm trying to unhighlight string if one of the quotes is escaped.
sh.nanorc
regex is as follows:
color brightyellow ""(\\.|[^"])*""
I'm having success with the closing quote when preceding it with [^\\]
:
color brightyellow ""(\\.|[^"])*"[^\\]"
But if I do the same to the opening one, although it does the work, but it also starts either coloring any other symbol preceding the string if the opening quote isn't escaped, or uncoloring the string if it starts at beginning of line.
So, how to get it done clean with both quotes?
Asked by Multifix
(145 rep)
Aug 12, 2023, 11:53 AM
Last activity: Aug 29, 2023, 08:46 PM
Last activity: Aug 29, 2023, 08:46 PM