Skip to content

[Bug] CPP raw string literals with quotes in delimiter breaks colorization #3128

@nebularnoise

Description

@nebularnoise

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Code

#include <string>
#include <iostream>


int main(){
    
    auto s = R""""(
    Hello World
    )"""";

    std::cout << "hello";
    
}

Actual Behavior

Colorization is broken in the code window, after the raw string literal.
This seems to be due to the used delimiter, which contains double quotes.

Expected Behavior

The following line

std::cout << "hello";

Should not be colorized fully in 'string colour'.

Additional Context

This issue was first opened on godbolt, I was told to report it upstream.
compiler-explorer/compiler-explorer#3684

Note: for the playground editor, I went here: https://microsoft.github.io/monaco-editor/index.html
set the language to CPP before pasting the code, the playground seemed JS only.

Screenshot_20220518_124917

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiestokenization

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions