-
Notifications
You must be signed in to change notification settings - Fork 10
Syntax highlight in code blocks #114
Comments
Here's an example using NodeJS. I would rather hook it up with the markdown to HTML renderer, but we don't have that option yet. |
Option 1 - I think this is the most ideal solution. - to use either prismjs or highlightjs. The majority of the work is already done, and it's as simple as including a js file and classing code blocks in the page templates. Option 2 - While I'm not a fan of having an extra language runtime as a dependency to solve a single problem, this does definitely solve the problem. Option 3 - The only downside here is that Makeup only supports Elixir, Erlang, and C; that's a pretty large downside in my opinion, compared to the previous 2 options. I like Option 2 and 3's idea of generating the html with the code highlighting built in, but i think Option 1 is the simplest and easiest to recommend. |
This is a tricky one. We're binding to hoedown via @still-ex/markdown. Ideally, we'd support that within the markdown parser but I don't think we have the bandwidth right now to do it ourselves (and I doubt hoedown is going to get updated). A few options:
To go with option 2, I'd steer away from adding PrismJS or HighlightJS and introduce node as a dependency but much rather do it completely in Elixir. The reasoning for this is almost exclusively developer experience with a few points for not wanting to maintain Node on this project. That being said, we don't have Elixir alternatives so I don't think we should leave this hanging. I think my preference is:
|
We really don't want to add Node as a dependency to the project. I think we can close this issue; people can go with option 1 or 2. Option 3 doesn't really exist. |
We need to decide what to recommend to folks that need syntax highlight in code blocks. At the moment, I can think of three solutions:
The text was updated successfully, but these errors were encountered: