Skip to main content
Active reading. [<http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29>]
Source Link
Peter Mortensen
  • 31.6k
  • 4
  • 22
  • 14

Why is basha Bash script not highlighted by google prettifyGoogle Prettify

Note: I could not distinctdistinguish if this is a bug due to a wrong inclusion of prettifyPrettify, prettifyPrettify itself or wrong usage by me, since it is not explicitly documented on prettifyPrettify, how to properly format bashBash 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 a code of two bashBash outputs mixed with one other code (e.g. javascriptJavaScript).

Formatting the following way does not highlight the bashBash 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 bashBash script formattings are ignored and (somehow) receive the formatting of the javascriptJavaScript syntax. Is this a bug on SOStack Overflow/prettifyPrettify or am I doing it wrong?

Why is bash script not highlighted by google prettify

Note: I could not distinct if this is a bug due to 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 a 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 SO/prettify or am I doing it wrong?

Why is a Bash script not highlighted by Google Prettify

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?

update note
Source Link
Jankapunkt
  • 8.4k
  • 12
  • 10

Note:INote: I could not distinct if this is a bug due to 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 a 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-bshsh -->
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-bshbash -->
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
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 SO/prettify or am I doing it wrong?

Note:I could not distinct if this is a bug due to 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.

I have a 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-bsh -->
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-bsh -->
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 SO/prettify or am I doing it wrong?

Note: I could not distinct if this is a bug due to 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 a 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 SO/prettify or am I doing it wrong?

edited tags
Link
psubsee2003
  • 8.7k
  • 16
  • 170
  • 168
Source Link
Jankapunkt
  • 8.4k
  • 12
  • 10
Loading