test fix
Showing
1 changed file
with
3 additions
and
4 deletions
... | @@ -20,15 +20,14 @@ | ... | @@ -20,15 +20,14 @@ |
20 | attr[0] = attr[0].replace(/^\s+|\s+$/g, ''); | 20 | attr[0] = attr[0].replace(/^\s+|\s+$/g, ''); |
21 | 21 | ||
22 | // This is not sexy, but gives us the resulting object we want. | 22 | // This is not sexy, but gives us the resulting object we want. |
23 | if (attr[1]) | 23 | if (attr[1]) { |
24 | { | ||
25 | attr[1] = attr[1].replace(/^\s+|\s+$/g, ''); | 24 | attr[1] = attr[1].replace(/^\s+|\s+$/g, ''); |
26 | if(attr[1].indexOf('"')!= -1 ) { | 25 | if (attr[1].indexOf('"') !== -1) { |
27 | attr[1] = attr[1].split('"')[1]; | 26 | attr[1] = attr[1].split('"')[1]; |
28 | } | 27 | } |
29 | result[attr[0]] = attr[1]; | 28 | result[attr[0]] = attr[1]; |
30 | } else { | 29 | } else { |
31 | attrs[i-1] = attrs[i-1] + ',' + attr[0]; | 30 | attrs[i - 1] = attrs[i - 1] + ',' + attr[0]; |
32 | } | 31 | } |
33 | } | 32 | } |
34 | return result; | 33 | return result; | ... | ... |
-
Please register or sign in to post a comment