Skip to content
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

Merged
merged 14 commits into from
Apr 21, 2021

Conversation

acizmarik
Copy link
Member

@acizmarik acizmarik commented Apr 1, 2021

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 compiling String.Format(...) calls to JavaScript, the function dotvvm.globalize.format(...) is used.

Implementation progress:

  • Expression interpolation support
  • String formatting component
  • String alignment component (we decided that this will not be supported)

@acizmarik acizmarik added this to the Version 3.1 milestone Apr 1, 2021
Copy link
Member

@exyi exyi left a 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.

@acizmarik
Copy link
Member Author

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.
I will add more tests, do some refactoring and then will request one more review of the changes :)

@acizmarik acizmarik requested a review from exyi April 8, 2021 15:11
@quigamdev quigamdev merged commit c0a9321 into main Apr 21, 2021
@acizmarik acizmarik deleted the feature/string-interpolation branch May 10, 2021 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

String interpolation in bindings
3 participants