valeriangalliat / markdown-it-highlightjs

Preset to use highlight.js with markdown-it.
The Unlicense
54 stars 30 forks source link

inline code support #9

Closed DorothyGuan closed 4 years ago

DorothyGuan commented 4 years ago

I found that inline code in markdown document won't be highlighted. However, code blocks can be highlighted normally. Here is an example for this case. Is there anything wrong with my usage?

https://codesandbox.io/s/elated-banach-5v3tz?file=/src/App.js

valeriangalliat commented 4 years ago

You're absolutely right! This only highlight code blocks since I'm not aware of a standard way to specify the language for inline code (and highlighting without knowing the language especially on short bits of code would more likely yield unwanted results)

DorothyGuan commented 4 years ago

That makes sense. Then I have to consider another way to make inline code more visible. They are too ordinary to be noticed... Thank you for your reply!

wetmore commented 4 years ago

@DorothyGuan I've added this functionality in a PR https://github.com/valeriangalliat/markdown-it-highlightjs/pull/10