-
Notifications
You must be signed in to change notification settings - Fork 97
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
Added support for string interpolation in bindings #987
Conversation
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.
Pretty cool :) Just please have a look at the case with nested expressions.
src/DotVVM.Framework/Compilation/Binding/ExpressionBuildingVisitor.cs
Outdated
Show resolved
Hide resolved
src/DotVVM.Framework/Compilation/Binding/ExpressionBuildingVisitor.cs
Outdated
Show resolved
Hide resolved
src/DotVVM.Framework/Compilation/Parser/Binding/Parser/BindingParser.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Stanislav Lukeš <[email protected]>
Co-authored-by: Stanislav Lukeš <[email protected]>
Fixed building issues
Thanks for review. You were right - nested expressions were broken if they contained strings. It should be fixed now. Also formatting should now be supported. |
Resolves #362. This PR adds support for string interpolation in bindings.
Interpolated strings are always translated into C#
String.Format(...)
calls, unless a constant string is provided with no interpolation expressions. When compilingString.Format(...)
calls to JavaScript, the functiondotvvm.globalize.format(...)
is used.Implementation progress:
String alignment component(we decided that this will not be supported)