diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/style-reader.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/style-reader.js b/lib/style-reader.js index b76478f..ef379b6 100644 --- a/lib/style-reader.js +++ b/lib/style-reader.js @@ -19,12 +19,14 @@ function createStyleRule() { lop.rules.sequence.capture(documentMatcherRule()), lop.rules.tokenOfType("whitespace"), lop.rules.tokenOfType("arrow"), - lop.rules.tokenOfType("whitespace"), - lop.rules.sequence.capture(htmlPathRule()) + lop.rules.sequence.capture(lop.rules.optional(lop.rules.sequence( + lop.rules.tokenOfType("whitespace"), + lop.rules.sequence.capture(htmlPathRule()) + ).head())) ).map(function(documentMatcher, htmlPath) { return { from: documentMatcher, - to: htmlPath + to: htmlPath.valueOrElse(htmlPaths.empty) }; }); } |
