aboutsummaryrefslogtreecommitdiff
path: root/lib/options-reader.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-08-14 22:16:18 +0100
committerMichael Williamson <mike@zwobble.org>2015-08-14 22:16:18 +0100
commitda7ca2ccd9542f6a280bf5b676ea111a8e102729 (patch)
treef1f90661d5f2dd0542e53f7a5bf91669a4b206cf /lib/options-reader.js
parent4b4ec85bc4f49e72244f7219539124b45b876d8e (diff)
Ignore lines in style map beginning with #
Diffstat (limited to 'lib/options-reader.js')
-rw-r--r--lib/options-reader.js10
1 files changed, 7 insertions, 3 deletions
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;
}