// skip comments/process pragmas
if (line.length() == 0 || line.startsWith("#"))
{
- if (line.toLowerCase().startsWith("##"))
+ if (line.toLowerCase().startsWith("##")
+ || line.indexOf("gff-version") > -1)
{
processGffPragma(line, gffProps, align, newseqs);
}
// close off any open 'forward references'
return;
}
-
- String[] tokens = line.substring(2).split(" ");
+ int startpragma = (line.charAt(1) == '#') ? 2 : 1; // lax
+ String[] tokens = line.substring(startpragma).split(" ");
String pragma = tokens[0];
String value = tokens.length == 1 ? null : tokens[1];
}
else
{
- System.err.println("Ignoring unknown pragma: " + line);
+ if (startpragma == 2)
+ {
+ // only complain if it was a genuine pragma line starting with ##
+ System.err.println("Ignoring unknown pragma: " + line);
+ }
}
}
}