1. Rune Halvorsen
  2. linenoise

Commits

Rune Halvorsen  committed 4577b28

Small cleanup to js version. All whitespace tests pass again

  • Participants
  • Parent commits 43e7a87
  • Branches default

Comments (0)

Files changed (1)

File linenoise.js

View file
 
     function _parseAttributes(attrtoken, env) {
         var attrs = {};
-        attrtoken = attrtoken.slice(1, -1);
-        var pairs = attrtoken.split(/\s*,\s*/).map(function(e) { return e.split("=") });
+        attrtoken = _strip(attrtoken.slice(1, -1));
+        var pairs = attrtoken.split(/\s*,\s*/).map(function(e) { return e.split(/\s*=\s*/) });
         pairs.forEach(function(pair) {
-            attrs[_strip(pair[0])] = _interpolate(_strip(pair[1]), env);
+            attrs[pair[0]] = _interpolate(pair[1], env);
         })
 
         return attrs;