tslide icon indicating copy to clipboard operation
tslide copied to clipboard

Proper syntax highlighting

Open dkundel opened this issue 9 years ago • 11 comments

Hey everyone,

just one idea. Have you considered adding support for something like mikaelbr/marked-terminal? This way you still have JS syntax highlighting but also colors for other things such as headlines.

Cheers, Dominik

dkundel avatar Sep 07 '16 11:09 dkundel

Hey @dkundel, thanks for the suggestion. In my opinion tslide already does a good job at that so adding a new library to the table just to do some minor tweaks is not worth the effort. Let's hear what others say 👍

rafaelrinaldi avatar Sep 07 '16 15:09 rafaelrinaldi

Note that this will change presentation beyond just highlighting: tslide currently applies some styling to markdown (like boldening headings), but it doesn't render the markdown. e.g. # foo doesn't become foo; the markdown formatting remains. Is changing this desirable?

hackergrrl avatar Sep 07 '16 15:09 hackergrrl

@noffle Yeah, that's true. It's not something I expect at least. Happy with the current behavior.

rafaelrinaldi avatar Sep 07 '16 16:09 rafaelrinaldi

I think he means the highlighting in code blocks, that could certainly be improved

dominictarr avatar Sep 07 '16 20:09 dominictarr

Well this library would on the one hand fix the code highlighting. marked-terminal doesn't change the markdown itself either. Like it doesn't make headlines bigger. But it highlights them using different colors, supports inline boldness like tslide already has, supports markdown tables and others and has various other configurations.

This is the output of the example that they have in their code:

screen shot 2016-09-07 at 11 07 53 pm screen shot 2016-09-07 at 11 08 01 pm

dkundel avatar Sep 07 '16 21:09 dkundel

Awesome! My own darn fault for not actually reading what the module does. As long as the formatting isn't being changed, +100 to adding this. Maybe bonus points if there's a flag to disable, for the old guard.

hackergrrl avatar Sep 07 '16 21:09 hackergrrl

@dominictarr As far as I understood he wants to introduce highlighting for markdown, not only code blocks. Right now the only thing we do is basic stuff like bold/italic, this would introduce colors and whatnot.

It can be an interesting feature but not something that I personally miss. If you guys are OK with it, I am too :metal:

rafaelrinaldi avatar Sep 07 '16 21:09 rafaelrinaldi

worth it to get proper code highlighting, I think. gonna merge

dominictarr avatar Sep 08 '16 00:09 dominictarr

and then I realized it's not a PR yet! @dkundel would you like to make one?

dominictarr avatar Sep 08 '16 00:09 dominictarr

Yeah I'll work on it today or tomorrow and send a PR!

dkundel avatar Sep 08 '16 09:09 dkundel

Very excited now for this feature to land! :star2:

hackergrrl avatar Sep 18 '16 03:09 hackergrrl