-
Notifications
You must be signed in to change notification settings - Fork 469
Create quoted strings coming via API #1289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Make sure quoted strings coming via API are created as a String_Quoted instance. Adjust string "quoted" property sent via API on output.
👍 |
@@ -322,7 +322,7 @@ extern "C" { | |||
return sass_make_color(val->color.r, val->color.g, val->color.b, val->color.a); | |||
} break; | |||
case SASS_STRING: { | |||
return sass_make_string(val->string.value); | |||
return sass_string_is_quoted(val) ? sass_make_qstring(val->string.value) : sass_make_string(val->string.value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if/else would be more consitent IMHO
LGTM for a first fix! I am aware that we need a better and more complete API for Number and String handling. My goal is to also have operations available to the C-Bindings, so they don't need to implement addition, multiplication, concat etc. themselve. But not sure when/if I or someone else will come around to actually do it ... |
Oh noes... I actually want to use a pure C connector to libsass... please no C++ madness! |
@saper not sure what you mean? I'm talking about C functions like |
I understood wrongly - that you intend to introduce C++ operators. Personally I think that API is already way too large and too bloated. I'd rather have small JavaScript classes handling complex numbers/units or color class than rely on the API. The API should get the data in and out. Of course it does not help that the structures are opaque - I'd love to be able to see them. That would save us a LOT of API calls. |
@saper aside from style cleanups this is ready for 3.3. We'll be starting betas for 3.3. shortly as it's a massive update. |
Create quoted strings coming via API
@mgreter 💯 to exposing operators, we could very much use that |
Make sure quoted strings coming via API
are created as a String_Quoted instance.
Adjust string "quoted" property sent
via API on output.