Skip to content

CLI Recommendation for Syntax Highlighting? #166

@coolaj86

Description

@coolaj86

I see that there's no built-in highlighting, just the annotation.

echo '# JavaScript:

```js
function add(a, b) {
    return a + b;
}
```
' | comrak --gfm
<h1><a href="#javascript" aria-hidden="true" class="anchor" id="javascript"></a>JavaScript:</h1>
<pre lang="js"><code>function add(a, b) {
    return a + b;
}
</code></pre>

This makes makes sense because that's not really part of markdown per se and it would probably bring in an undesirable number of dependencies.

I'm wondering if you have a recommendation of a tool (rust, go, or otherwise) that is as easy to install and use as comrak (i.e. not ruby, node, or python with all their dependencies) that I could put in the next | to complete the output.

Thoughts?

I understand that this is outside of the scope of comrak itself, but I believe it's worth noting at least hear in the issues since these are tools that would commonly go together.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions