Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: include.preload.js

Issue 5663214012465152: Issue 2467 - Ingore inner quotes when parsing CSS selectors (Closed)
Patch Set: Created May 7, 2015, 3:25 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -160,12 +160,15 @@
j++;
else if (chr == sep)
sep = "";
- else if (chr == '"' || chr == "'")
- sep = chr;
- else if (chr == "," && sep == "")
+ else if (sep == "")
{
- result.push(prefix + selector.substring(start, j));
- start = j + 1;
+ if (chr == '"' || chr == "'")
+ sep = chr;
+ else if (chr == ",")
+ {
+ result.push(prefix + selector.substring(start, j));
+ start = j + 1;
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld