You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to have language-specific syntax-highlighting for code snippets in the Markdown editor. I tried the following snippet in the editor,
but could not get syntax-highlighting for Java,
For technical blogposts, syntax highlighting helps viewers to read the code easily, and differentiates it from plain-text (which has no highlighting). I noticed that tunalog uses the SimpleMDE as the Markdown editor and proceeded to find these two issues concerning syntax-highlighting in SimpleMDE,
The text was updated successfully, but these errors were encountered:
shubham0204
changed the title
Syntax highlighting for code snippets in Markdown
[Feature] Syntax highlighting for code snippets in Markdown
Sep 3, 2024
Syntax highlighting works in the Post, but it's disabled in the Markdown Editor/Preview for a few reasons:
The highlighting style differs between the Editor and the actual Post.
Tunalog has a Theme feature, which the Markdown Preview can't accurately reflect in the final result.
Since both of these issues can cause confusion, I decided to disable it when I found that the editor on GitHub doesn't support syntax highlighting either. I'd like to hear your thoughts on this.
It originally worked in the Markdown Editor/Preview:
But it doesn’t look the same as what it will be in the final post result.
@YamiOdymel Considering the difference in syntax-highlighting, it seems that the one in the final post is entering some 'dark' theme. The other possibility is that the highlighting in the editor is entering the 'light' mode. Is it possible to change the theme of code snippets in the editor (maybe we can change it from 'light' to 'dark' somehow?).
Just my initial thoughts! I think having syntax highlighting is more important than the difference observed in the editor and final-post.
It would be great to have language-specific syntax-highlighting for code snippets in the Markdown editor. I tried the following snippet in the editor,
but could not get syntax-highlighting for Java,
For technical blogposts, syntax highlighting helps viewers to read the code easily, and differentiates it from plain-text (which has no highlighting). I noticed that
tunalog
uses theSimpleMDE
as the Markdown editor and proceeded to find these two issues concerning syntax-highlighting inSimpleMDE
,The text was updated successfully, but these errors were encountered: