From 59ba08ea535c849a97956f1b8ec61da49259f5af Mon Sep 17 00:00:00 2001 From: thealexander90 Date: Wed, 19 Jul 2017 23:07:00 +0200 Subject: [PATCH 1/3] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1b22c3c..ffb1bdc 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,10 @@ The two first comment blocks of file can be used to pass parameters to the compi } } ``` +## About this Package + +This package was forked from jade-autocompile Atom extension by Manuel Rueda: https://github.com/ManRueda/jade-autocompile + ## License The MIT License (MIT) From 1b7a1afccf0c729c2b82947ccbbf8e684e4f4ae0 Mon Sep 17 00:00:00 2001 From: thealexander90 Date: Wed, 19 Jul 2017 23:32:09 +0200 Subject: [PATCH 2/3] Update .travis.yml --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index f8d6a88..7e9eeed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,8 @@ env: os: - linux +dist: + - trusty ### Generic setup follows ### script: From 6ef6d0550dc1e25ea67acdf9af810e5ec1cdf85d Mon Sep 17 00:00:00 2001 From: Danova Date: Thu, 20 Jul 2017 20:20:14 +0200 Subject: [PATCH 3/3] Fixed with check for colon Fixed by searching for colon --- README.md | 3 --- lib/jade-autocompile.js | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index ffb1bdc..20b9a45 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,6 @@ The two first comment blocks of file can be used to pass parameters to the compi } } ``` -## About this Package - -This package was forked from jade-autocompile Atom extension by Manuel Rueda: https://github.com/ManRueda/jade-autocompile ## License The MIT License (MIT) diff --git a/lib/jade-autocompile.js b/lib/jade-autocompile.js index b74cc07..b971619 100644 --- a/lib/jade-autocompile.js +++ b/lib/jade-autocompile.js @@ -20,7 +20,7 @@ function getOptions(file, options) { var extracted = /^\/\/(?!-)(.|\n[ \t])*/.exec(file); var params = extracted ? extracted[0].substring(2) : undefined; - if (params) { + if (params && (params.search(':') > 0)) { var opts = params.split(','); for (var i = 0; i < opts.length; i++) { var name = opts[i].split(':')[0].trim();