Skip to content

Syntax highlighting breaks for templates with parenthesis #586

Open
@MaryamZi

Description

@MaryamZi

Description

$title, when used as a default value of a parameter (therefore within parenthesis).

We might run into this often with with upcoming changes to use raw templates as default values for prompts.

Steps to Reproduce

isolated function fn(string c = string`
   - (AI in healthcare)?
`) returns int|error = external;


public function main() returns error? {
    string[] & readonly first = [];
}
Image

When the closing parenthesis within the template is removed

isolated function fn(string c = string`
   - (AI in healthcare?
`) returns int|error = external;


public function main() returns error? {
    string[] & readonly first = [];
}
Image

Version

4.7.9

Environment Details (with versions)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions