vscode.printcode
vscode.printcode copied to clipboard
Print mode for shell scripts does not work
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.