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

fix(core 8.2): Parse template literal syntax with nested identifiers as expression #9744

Merged

Conversation

CatchABus
Copy link
Contributor

@CatchABus CatchABus commented Jan 21, 2022

PR Checklist

What is the current behavior?

This is a change that came up due to expression parser rework and its new features.
NativeScript Core cannot parse XML expression with template literal syntax and nested indentifiers.
Example:

<Page actionBarHidden="true" xmlns="http://www.nativescript.org/tns.xsd">
    <GridLayout>
        <Label text="{{ 'Hello' + username }}"/> <!-- Works -->
        <Label text="{{ `Hello ${username}` }}"/> <!-- Only identifier 'username' will be parsed -->
    </GridLayout>
</Page>

What is the new behavior?

Template literal syntax that includes identifiers will be parsed as expression.

@cla-bot cla-bot bot added the cla: yes label Jan 21, 2022
@CatchABus CatchABus changed the title fix(8.2): Parse template literal syntax with nested identifiers as expression fix(core 8.2): Parse template literal syntax with nested identifiers as expression Jan 21, 2022
@NathanWalker NathanWalker merged commit c35ed94 into NativeScript:release/8.2.0 Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants