Skip to content

Commit

Permalink
Fixes Issue #4 (plus sign fallowed by white space)
Browse files Browse the repository at this point in the history
Was mistakenly treated as a include call. Also added the
white space clause for equal signs (treated as mixin call)
  • Loading branch information
mgreter committed Jul 2, 2014
1 parent b61837a commit f2a044b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sass2scss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,10 @@ namespace Sass
}

// replace some specific sass shorthand directives
else if (sass.substr(pos_left, 1) == "=") { sass = indent + "@mixin " + sass.substr(pos_left + 1); }
else if (sass.substr(pos_left, 1) == "+") { sass = indent + "@include " + sass.substr(pos_left + 1); }
else if (sass.substr(pos_left, 1) == "=" && sass.find_first_of(" \t\n\v\f\r", pos_left) != pos_left + 1)
{ sass = indent + "@mixin " + sass.substr(pos_left + 1); }
else if (sass.substr(pos_left, 1) == "+" && sass.find_first_of(" \t\n\v\f\r", pos_left) != pos_left + 1)
{ sass = indent + "@include " + sass.substr(pos_left + 1); }

// add quotes for import if needed
else if (sass.substr(pos_left, 7) == "@import")
Expand Down

0 comments on commit f2a044b

Please sign in to comment.