Skip to content

Commit f61a3b6

Browse files
committed
Merge pull request #1497 from mgreter/bugfix/string-division-op
Improve division operator for strings
2 parents 9ed0093 + aa1b5bd commit f61a3b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/eval.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,8 @@ namespace Sass {
13161316
if (ltype == Expression::NULL_VAL) error("invalid null operation: \"null plus "+quote(unquote(rstr), '"')+"\".", lhs.pstate());
13171317
if (rtype == Expression::NULL_VAL) error("invalid null operation: \""+quote(unquote(lstr), '"')+" plus null\".", rhs.pstate());
13181318

1319-
String_Constant* str = ltype == Expression::STRING || sep == ""
1319+
String_Constant* str = (ltype == Expression::STRING || sep == "") &&
1320+
(sep != "/" || !rqstr || !rqstr->quote_mark())
13201321
? SASS_MEMORY_NEW(mem, String_Quoted, lhs.pstate(), (lstr) + sep + (rstr))
13211322
: SASS_MEMORY_NEW(mem, String_Constant, lhs.pstate(), (lstr) + sep + quote(rstr));
13221323
str->quote_mark(0);

0 commit comments

Comments
 (0)