Skip to content

Output channel does not handle spaces in link detection #13245

@defr0std

Description

@defr0std
  • VSCode Version: 1.5.3
  • OS Version: Windows 10

Steps to Reproduce:

  1. Create a new vscode extension as described on the official page
  2. Write the following code in the extension.ts
var channel = vscode.window.createOutputChannel('test');
channel.show();

channel.append(path.join(vscode.workspace.rootPath, 'nospace', 'file.txt') + ':2:10\r\n');       

channel.append(path.join(vscode.workspace.rootPath, 'with space', 'file.txt') + ':2:10\r\n');    
channel.append(path.join(vscode.workspace.rootPath, 'with%20space', 'file.txt') + ':2:10\r\n');    
channel.append('"' + path.join(vscode.workspace.rootPath, 'with space', 'file.txt') + '"' + ':2:10\r\n');    
channel.append("'" + path.join(vscode.workspace.rootPath, 'with space', 'file.txt') + "'" + ':2:10\r\n');
  1. Run the extension and open the folder with the following structure:
    myfolder
    -- with space
    ---- file.txt
    -- nospace
    ---- file.txt
  2. Run "Hello world" command to trigger extension and expect the output

The first link to \nospace\file.txt:2:10 is correctly recognized and ctrl+click opens the file.
The rest of the links to \with space\file.txt:2:10 are not correctly parsed. Quoting to url escaping does not help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiesoutputOutput channel system issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions