New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using marked `higlight` option from CLI? #110

Closed
JeanMertz opened this Issue Jan 17, 2013 · 4 comments

Comments

Projects
None yet
5 participants
@JeanMertz
Copy link

JeanMertz commented Jan 17, 2013

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

This comment has been minimized.

Copy link

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 https://github.com/chemzqm/marked it make use of highlight.js by default,
and you could disable highlight by option --no-color

@scottgonzalez

This comment has been minimized.

Copy link
Contributor

scottgonzalez commented May 29, 2013

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

@matthewp

This comment has been minimized.

Copy link

matthewp commented Jun 18, 2015

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:

options.js

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

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

cli

cat my-thing.md | marked --options path/to/options.js
@joshbruce

This comment has been minimized.

Copy link
Member

joshbruce commented Dec 3, 2017

#27

@joshbruce joshbruce closed this Dec 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment