From 277a180cd0761e9aef67e442876e2997bb350d2e Mon Sep 17 00:00:00 2001 From: Jeremy Schomery Date: Mon, 6 Mar 2017 16:23:45 +0330 Subject: [PATCH] new fix #36 --- codemirror-overwrites/addon/lint/css-lint.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codemirror-overwrites/addon/lint/css-lint.js b/codemirror-overwrites/addon/lint/css-lint.js index 2e1ce7f1..e6f21682 100644 --- a/codemirror-overwrites/addon/lint/css-lint.js +++ b/codemirror-overwrites/addon/lint/css-lint.js @@ -40,9 +40,9 @@ CodeMirror.registerHelper("lint", "css", function(text) { if (message.message.indexOf('unicode-range') !== -1) { continue; } - else if ( // color: hsl(210, 100%, 2.2%); + else if ( // color: hsl(210, 100%, 2.2%); or color: hsla(210, 100%, 2.2%, 0.3); message.message.startsWith('Expected () but found \'hsl') && - /hsl\((\d+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\)/.test(message.message) + /hsla?\(\s*(-?\d+)%?\s*,\s*(-?\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%(\s*,\s*(-?\d+|-?\d*.\d+))?\s*\)/.test(message.message) ) { continue; }