Note: I could not distinguish if this is a bug due to a wrong inclusion of Prettify, Prettify itself or wrong usage by me, since it is not explicitly documented on Prettify, how to properly format Bash scripts. There is only an indirect reference on supported languages, indicating using lang-bsh. Using lang-sh does not work either.
Update: I added also the lang tags lang-bash and lang-sh, which do not work either.
I have code of two Bash outputs mixed with one other code (e.g. JavaScript).
Formatting the following way does not highlight the Bash scripts as expected:
<!-- language: lang-bsh -->
$ npm install --save tarball-output.tgz
<!-- language: lang-js -->
let someFunc = function(){ return "proper format" }
<!-- language: lang-sh -->
ERROR: (gcloud.beta.functions.deploy) OperationError: code=3,
message=Function load error: Code in file app.js can't be loaded.
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module 'my_package'
<!-- language: lang-bash -->
W20170704-12:19:27.778(2)? (STDERR) MochaRunner.runServerTests: failures: 7
Returns the following formatted codes:
$ npm install --save tarball-output.tgz
let someFunc = function(){ return "proper format" }
ERROR: (gcloud.beta.functions.deploy) OperationError: code=3,
message=Function load error: Code in file app.js can't be loaded.
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module 'my_package'
W20170704-12:19:27.778(2)? (STDERR) MochaRunner.runServerTests: failures: 7
As you can see, the Bash script formattings are ignored and (somehow) receive the formatting of the JavaScript syntax. Is this a bug on Stack Overflow/Prettify or am I doing it wrong?
lang-bash
? In Stack Overflow answers it works fine to me.lang-bsh
for the first one.lang-none
or blockquote formatting for error and log files. Personally, seeingCode
formatted as a class name andin
as a keyword in the error message (not to mention the comments starting atcan't
) makes my eyes twitch...