Skip to content

Commit

Permalink
Fixes support for 'else if' and !== operator.
Browse files Browse the repository at this point in the history
  • Loading branch information
Umakant Patil committed Dec 11, 2013
1 parent d0a8d1f commit c5430cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions smart.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@
parse(content.slice(0,findElse.index),subTreeIf);

content = content.slice(findElse.index+findElse[0].length);
var findElseIf = findElse[1].match(/^elseif(.*)/);
var findElseIf = findElse[1].match(/^else[\s*]if(.*)/);
if (findElseIf)
{
buildInFunctions['if'].parse(parseParams(findElseIf[1]), subTreeElse, content.replace(/^\n/,''));
Expand Down Expand Up @@ -1220,7 +1220,7 @@
}
},
{
re: /^\s*(===|==|!=|!==)\s*/,
re: /^\s*(===|!==|==|!=)\s*/,
parse: function(e, s)
{
parseOperator(RegExp.$1, 'binary', 6, e.tree);
Expand Down Expand Up @@ -1700,7 +1700,7 @@
{
if (typeof val == 'undefined')
{
return '';
return val;
}
v[nm] = {};
v = v[nm];
Expand Down

0 comments on commit c5430cc

Please sign in to comment.