Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Bash and Shell) There is no syntax highlighting for the two. I've seen another issue but didn't seem it got answered. #4036

Open
dagweg opened this issue Apr 7, 2024 · 3 comments
Labels
bug help welcome Could use help from community language

Comments

@dagweg
Copy link

dagweg commented Apr 7, 2024

image

The above is the one I'm trying to highlight using marked & I've correctly loaded the language

hljs.registerLanguage("bash", require("highlight.js/lib/languages/bash"));

It doesn't highlight the code even though it works for all other languages.

@dagweg dagweg added bug help welcome Could use help from community language labels Apr 7, 2024
@joshgoebel
Copy link
Member

Just registering a language doesn't highlight anything. You'll need to be much more specific or provide an actual jdfiddle example.

@matanox
Copy link

matanox commented May 8, 2024

Don't most docs say that it does syntax highlight the code block?
Here's an example where no shell/bash syntax highlighting is applied.

python -m a.b.c --foo --bar 99

The source to the above block is the same as in the original post. The result bears no visible syntax highlighting here, nor in project markdown files.

@joshgoebel
Copy link
Member

Any errors in your JS console?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help welcome Could use help from community language
Projects
None yet
Development

No branches or pull requests

3 participants