We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 72bebed + 8330a1a commit 0dd6543Copy full SHA for 0dd6543
parser.hpp
@@ -165,11 +165,17 @@ namespace Sass {
165
template <prelexer mx>
166
const char* lex_css()
167
{
168
+ // copy old token
169
+ Token prev = lexed;
170
// throw away comments
171
// update srcmap position
172
lex < css_comments >();
- // now lex a token
- return lex< mx >();
173
+ // now lex a new token
174
+ const char* pos = lex< mx >();
175
+ // maybe restore prev token
176
+ if (pos == 0) lexed = prev;
177
+ // return match
178
+ return pos;
179
}
180
181
// all block comments will be skipped and thrown away
0 commit comments