Skip to content

Strange colourisation of template strings when "#/" present after first placeholder #3630

@johnnyreilly

Description

@johnnyreilly

I've noticed some odd behavior with the syntax colourisation for template strings in Visual Studio 2013 (using TypeScript 1.4 plugin). It occurs when the string "#/" is present within the template string after at least one placeholder is present. I realise reading that is as clear as mud so look at the screenshot below for clarification:

image

As you can see the first 2 examples colourise in the fashion you would hope. The 3rd example behaves in an unexpected fashion after the "#/". Here's the code you can use to reproduce it with:

class highlightingBug {

    demo() {

        var urlWithoutHash =
            `i_look_kind_of_normal_${"I_think"}`;

        var urlWithHash =
            `and_so_do_I_even_with_#/_in_place_${"I_think"}`;

        var urlWithHashAfterFirstPlaceHolder =
            `${"But_me_"}_well_things_look_a_little_odd_colour_wise_after_the_#/_${"That_is_what_I_think_anyway"}`;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already createdFixedA PR has been merged for this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions