| Index: lib/synchronizer.js |
| =================================================================== |
| --- a/lib/synchronizer.js |
| +++ b/lib/synchronizer.js |
| @@ -160,16 +160,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*([^\s:]*)\s*(:)?\s*(.*)/.exec(lines[i]); |
| + if (!match) |
| + break; |
| + |
| + if (match[2]) |
| { |
| let keyword = match[1].toLowerCase(); |
| - let value = match[2]; |
| - if (keyword in params) |
| + if (params.hasOwnProperty(keyword)) |
| { |
| - params[keyword] = value; |
| + params[keyword] = match[3]; |
| lines.splice(i--, 1); |
| } |
| } |