Skip to content
Snippets Groups Projects
Commit 0779c4f0 authored by rswindell's avatar rswindell
Browse files

parse_news_header() now supports obsolete header field syntax: "field : data"

and now supports tabs as well as white-space between colon and data.
pre-pended spaces are no longer removed from field name (field's always start
at column 0).
parent b7f1a7f9
No related branches found
No related tags found
No related merge requests found
......@@ -77,13 +77,13 @@ function parse_news_header(hdr, line)
return;
data=line.slice(sp+1);
while(data.charAt(0)==' ') // trim prepended spaces
while(data.charAt(0)==' ' // trim prepended spaces
|| data.charAt(0)=='\t')
data=data.slice(1);
data=truncsp(data); // trim trailing spaces
line=line.substr(0,sp);
while(line.charAt(0)==' ') // trim prepended spaces
line=line.slice(1);
line=truncsp(line); // trim trailing spaces (support "field : data" syntax)
switch(line.toLowerCase()) {
case "to":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment