From da7ca2ccd9542f6a280bf5b676ea111a8e102729 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 14 Aug 2015 22:16:18 +0100 Subject: Ignore lines in style map beginning with # --- lib/options-reader.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/options-reader.js b/lib/options-reader.js index e61507e..f2f31e2 100644 --- a/lib/options-reader.js +++ b/lib/options-reader.js @@ -71,9 +71,13 @@ function readCustomStyleMap(styleMap) { if (!styleMap) { return []; } else if (_.isString(styleMap)) { - return styleMap.split("\n").map(function(line) { - return line.trim(); - }); + return styleMap.split("\n") + .filter(function(line) { + return line.charAt(0) !== "#"; + }) + .map(function(line) { + return line.trim(); + }); } else { return styleMap; } -- cgit v1.2.3