File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ namespace Sass {
105
105
wbuf.buffer = text + wbuf.buffer ;
106
106
}
107
107
108
+ char Emitter::last_char ()
109
+ {
110
+ return wbuf.buffer .back ();
111
+ }
112
+
108
113
// append a single char to the buffer
109
114
void Emitter::append_char (const char chr)
110
115
{
@@ -217,7 +222,9 @@ namespace Sass {
217
222
if ((output_style () != COMPRESSED) && buffer ().size ()) {
218
223
unsigned char lst = buffer ().at (buffer ().length () - 1 );
219
224
if (!isspace (lst) || scheduled_delimiter) {
220
- append_mandatory_space ();
225
+ if (last_char () != ' (' ) {
226
+ append_mandatory_space ();
227
+ }
221
228
}
222
229
}
223
230
}
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ namespace Sass {
73
73
// append some text or token to the buffer
74
74
// this adds source-mappings for node start and end
75
75
void append_token (const std::string& text, const AST_Node_Ptr node);
76
+ // query last appended character
77
+ char last_char ();
76
78
77
79
public: // syntax sugar
78
80
void append_indentation ();
You can’t perform that action at this time.
0 commit comments