Skip to content

Link tooltip removes duplicated backslashes #258614

@rcjsuen

Description

@rcjsuen

Does this issue occur when all extensions are disabled?: Yes, I confirm that I can still reproduce the problem.

  • VS Code Version: 1.102.3
  • OS Version: macOS Sequoia 15.5

Steps to Reproduce:

123456789
123456789
  1. Create a text file with the content above.
  2. Create an extension with the content below.
  3. Debug the extension.
  4. Open the text file from step 1.
  5. Hover and see that the tooltip shows only one backslash instead of two... 🤔
  6. I can also reproduce this problem in Monaco. See here.
Image
import * as vscode from 'vscode';

export function activate(context: vscode.ExtensionContext) {
	context.subscriptions.push(vscode.languages.registerDocumentLinkProvider("plaintext", {
		provideDocumentLinks: () => {
			return [
				{
					target: vscode.Uri.parse("file:///tmp/hello.txt"),
					tooltip: "\\\\a\\\\b\\\\c",
					range: new vscode.Range(1, 0, 1, 5),
				}
			];
		}
	}));
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions