Index: lib/synchronizer.js |
=================================================================== |
--- a/lib/synchronizer.js |
+++ b/lib/synchronizer.js |
@@ -158,16 +158,18 @@ |
version: null, |
expires: null |
}; |
- for (let i = 0; i < lines.length; i++) |
+ for (let i = 1; i < lines.length; i++) |
{ |
- let match = /^\s*!\s*(\w+)\s*:\s*(.*)/.exec(lines[i]); |
- if (match) |
+ let match = /^\s*!\s*(?:(\w+)\s*:\s*(.*)|\S)/.exec(lines[i]); |
+ if (!match) |
+ break; |
+ |
+ if (typeof match[1] != "undefined") |
{ |
let keyword = match[1].toLowerCase(); |
- let value = match[2]; |
- if (keyword in params) |
+ if (params.hasOwnProperty(keyword)) |
{ |
- params[keyword] = value; |
+ params[keyword] = match[2]; |
lines.splice(i--, 1); |
} |
} |