Skip to content

Commit

Permalink
fixed bug with '//' appearing partway through a line, causing entire …
Browse files Browse the repository at this point in the history
…line to register as a comment
  • Loading branch information
Erik Derohanian committed Oct 18, 2012
1 parent 3fd1716 commit 81d44b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/JBrowse/ConfigAdaptor/gbrowse.js
Expand Up @@ -35,7 +35,7 @@ return declare('JBrowse.ConfigAdaptor.gbrowse',null,
subsection: /^\s*\[\s*([^\]]*)\/([^\]]*)\s*\]\s*$/,
param: /^(\w[\w\.\-\_\:\s]+)=\s*(.*?)\s*$/,
halfParam: /^(\w[\w\.\-\_\:\s]+)=\s*$/,
comment: /^\s*#|(\/\/).*$/,
comment: /^\s*(#|\/\/).*$/,
emptyLine: /^\s*$/,
newLine: /\r\n|\r|\n/
};
Expand All @@ -49,10 +49,10 @@ return declare('JBrowse.ConfigAdaptor.gbrowse',null,
//Process each line
for (var i = 0; i < n; i++) {
if (this.regex.comment.test(this.lines[i])) { // #this is a comment
// do nothing, since it's a comment.
} else if (this.regex.halfParam.test(this.lines[i])) { // name =
// do nothing, since it's a comment. // // this is also a comment
} else if (this.regex.halfParam.test(this.lines[i])) { // halfParam =
i = this.multiLine(i); // skips lines, so get 'i': where to continue
} else if (this.regex.param.test(this.lines[i])) { // name = value
} else if (this.regex.param.test(this.lines[i])) { // param = value
this.param(i);
} else if (this.regex.subsection.test(this.lines[i])) { // [section_name]
this.subSection(i);
Expand Down

0 comments on commit 81d44b1

Please sign in to comment.