find more rgb/hsl colors near cursor in comments and strings
This commit is contained in:
parent
0c3b3a1631
commit
c1c61ed590
|
@ -215,7 +215,10 @@
|
|||
|
||||
function parseColorAtCursor(lineText, lineTextLC = lineText.toLowerCase(), ch) {
|
||||
const iHex = lineTextLC.lastIndexOf('#', ch);
|
||||
const iParen = lineTextLC.lastIndexOf('(', ch);
|
||||
const iParen = (
|
||||
lineTextLC.lastIndexOf('(', ch) + 1 ||
|
||||
lineTextLC.indexOf('(', ch) + 1
|
||||
) - 1;
|
||||
let start = Math.max(iHex, iParen);
|
||||
let match, end, color, colorValue;
|
||||
if (start >= 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user