Skip to content
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
Closed

Using marked higlight option from CLI? #110

JeanMertz opened this issue Jan 17, 2013 · 4 comments

Comments

@JeanMertz
Copy link

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
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
Copy link
Contributor

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

@matthewp
Copy link

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
Copy link
Member

#27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants