Skip to content

Using ? as a string literal inside a custom function stops highlighting #10

@Kurounin

Description

@Kurounin

When using ? inside the body of a function the highlighting stops working (it's probably expecting an optional member access):

{{ func customFunc }}
private string _GetNullableValue(string? value, string defaultValue = string.Empty)
{
    return value ?? defaultValue;
}
{{ end }}

public partial class {{ Name }}
{
    {{ customFunc }}
}

Any idea on how to get around this? I can't put the func at the of the file or move it to a separate template file to include it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions