Using marked `higlight` option from CLI? #110

JeanMertz opened this Issue Jan 17, 2013 · 3 comments


None yet
4 participants

Is it possible to generate highlighted fenced code blocks using the --gfm option and have it parse syntax highlighting?

I noticed man marked mentioning nothing about --highlight option. I did install highlight.js using npm so maybe it is possible somehow?

chemzqm commented Feb 3, 2013

There's no --highlight option, you need to write some code to make it,
You can also try out my repo it make use of highlight.js by default,
and you could disable highlight by option --no-color


scottgonzalez commented May 29, 2013

@chjj Unless there's a different answer than "you need to write some code", this should just be closed.

I was thinking about what if you could provide options in a javascript file, that way you could write some code but still use the cli. You could do something like:


var highlight = require("highlight.js");

module.exports = {
  highlight: function(){
    return ...


cat | marked --options path/to/options.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment