fixing for loop
authorNicholas Bollweg <nicholas.bollweg@gtri.gatech.edu>
Tue, 22 Oct 2013 14:59:32 -0400
changeset 2077 134f64d36775
parent 2076 df655b10a4eb
child 2078 aa13876c276a
fixing for loop
playground/codemirror.jsonld.js
--- a/playground/codemirror.jsonld.js	Tue Oct 22 14:30:05 2013 -0400
+++ b/playground/codemirror.jsonld.js	Tue Oct 22 14:59:32 2013 -0400
@@ -189,10 +189,11 @@
           "set|reverse|index|base|vocab|graph",
         ldEndQuote = "(?=\")",
         ldKeywordRE = new RegExp("^@(" + ldKeywords + ")" + ldEndQuote),
-        ldUriRE = new RegExp("https?://[^\"]+" + ldEndQuote);
+        ldUriRE = new RegExp("https?://[^\"]+" + ldEndQuote),
+        i = ldAtomicTypes.length;
       
-      for(var atom in ldAtomicTypes){
-        atomicTypes[atom] = true;
+      while(i--){
+        atomicTypes[ldAtomicTypes[i]] = true;
       }
       
       jsTokenString = function(quote){