vscode.printcode icon indicating copy to clipboard operation
vscode.printcode copied to clipboard

Print mode for shell scripts does not work

Open ray-yin opened this issue 6 years ago • 0 comments

mode equals undefined when printing shell scripts. Looking through the source, the issue lies in how VS Code reports back the languageId.

VS Code uses shellscript for the languageId while CodeMirror expects it to be shell. This mismatch causes the language to be returned as undefined.

Adding the following in funcs.js after line 3 fixes the immediate issue but I'm sure there are other languages with similar mapping issues:

  if (language == 'shellscript') {
    language = 'shell';
  }

Let me know if you want me to submit a PR for this fix.

ray-yin avatar Feb 25 '19 03:02 ray-yin