Commit 36d3bded authored by Nathan White's avatar Nathan White

updated parseLine to handle multiple ':'

fully qualified urls for Sitemap rules are currently broken.
parent 2450a75e
......@@ -14,14 +14,12 @@ var START_GROUP = 'START_GROUP',
function parseLine(line) {
var commentFree = line.replace(/#.*$/, ''),
parts = commentFree.split(':');
if (parts.length !== 2) {
return null;
}
index = commentFree.indexOf(':');
if(index === -1) return null;
var field = parts[0].trim().toLowerCase(),
value = parts[1].trim();
var field = commentFree.substr(0,index).trim().toLowerCase(),
value = commentFree.substr(index+1).trim();
switch (field) {
case 'user-agent':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment