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

syntax highlight for markdown code block #963

Closed
laoshaw opened this issue Apr 29, 2020 · 8 comments
Closed

syntax highlight for markdown code block #963

laoshaw opened this issue Apr 29, 2020 · 8 comments
Labels
bug Something isn't working syntax-highlighting

Comments

@laoshaw
Copy link

laoshaw commented Apr 29, 2020

I like the way bat highlight most file types, markdown is one of the most commonly used and if bat supports highlighting of its code block that will be great.

@laoshaw laoshaw added the feature-request New feature or request label Apr 29, 2020
@sharkdp
Copy link
Owner

sharkdp commented Apr 29, 2020

That should work out of the box. Have you seen the first screenshot in the README?

@laoshaw
Copy link
Author

laoshaw commented Apr 29, 2020

Yes there are some highlighting, it looks much bare-bone comparing to the original code though, actually too bare-bone.

cp test.py test.md
vi test.md to make it surrounded by python code block tags, ```python ```
bat test.py -- nicely highlighted
bat test.md -- barely highlighted

@sharkdp sharkdp added bug Something isn't working syntax-highlighting and removed feature-request New feature or request labels Apr 29, 2020
@sharkdp
Copy link
Owner

sharkdp commented Apr 29, 2020

You are right. That's actually a regression in bat 0.13.0. It used to work fine before.

Edit: This was broken in 65023a9

@sharkdp
Copy link
Owner

sharkdp commented Apr 29, 2020

And this is the commit that broke the Markdown syntax for us: sublimehq/Packages@c08f853

@sharkdp
Copy link
Owner

sharkdp commented May 11, 2020

Temporarily fixed by patching the Markdown syntax.

@sharkdp
Copy link
Owner

sharkdp commented May 11, 2020

Fix released in v0.15.1

@rayntriton
Copy link

Bug persists at compile from source.
Tested on a md file with js and clj . The clj part is not highlighted.
p.d. Thank you for bat

@sharkdp
Copy link
Owner

sharkdp commented Mar 6, 2022

@rayntriton That is a separate issue. Maybe related to #2084

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working syntax-highlighting
Projects
None yet
Development

No branches or pull requests

3 participants