diff --git a/lib/node-iniparser.js b/lib/node-iniparser.js index 93397a3..b212252 100644 --- a/lib/node-iniparser.js +++ b/lib/node-iniparser.js @@ -39,6 +39,9 @@ module.exports.parseSync = function(file){ }; function parse(data){ + // Line continuation, if a line starts with white space "\s" it will be appended to the previous line + data = data.replace(/((\r\n\s+)?|(\r\s+)?|(\n\s+)?)/mg,""); //this regex combines lines that have leading white space + var value = {}; var lines = data.split(/\r\n|\r|\n/); var section = null;