-
Notifications
You must be signed in to change notification settings - Fork 315
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
Syntax highlight using Pygments #225
Comments
would be really great to add pygments here 👍 |
@vyscond -- I made a pull request with my changes. It's a tiny piece of code, so should be easy to integrate it into your own setup. Grab it and let me know what you think. |
The pull request is here: #227 |
Got it. But i think you need to add pygments to dependencies. Right now you plugin kind assumes that we have pygments installed as a global package. Right? |
Correct. I've not defined dependencies properly but the import statements are pretty clear :) |
Is the intention to syntax highlight markdown? I'm currently achieving this by adding the
So there may not be any need for an additional cactus plugin. |
in this case you installed pygments globally? |
I use a virtualenv for Cactus so I've got pygments installed in there. You could install it globally if you prefer. The nice thing with the MD template tag and the (built in) fenced-code-blocks extension, there's no hard dependency on pygments. |
I think this "problem"/"request" is more related to people using the mac app. |
@vyscond - oh right... in that case, yeah, install it globally or go hacking around inside the OS X application package. We should start making use of 'labels'.... @krallin @koenbok - I'd be happy to help with that sort of housekeeping if it's possible to assign that role without giving out commit rights. |
I can't think about any terrible thing right now about including pygments as default dependency on both environments. May add a app option too turn/switch on/off the pygment render. I think... |
@vyscond This request/issue is not specific to the mac app at all |
@vyscond - I'd prefer to see it remain optional in the core cactus package. It's really an optional/extended feature. Once it's set as a dependency the matters of ongoing stability, compatibility, etc. become more critical. As it currently stands, it's super simple to install pygments via pip and the python markdown engine will use it if it's available. If the markdown project deemed it essential for markdown authors, then we'd be picking it up via that dependency chain. Their approach seems to support my point above. For the mac app, then it may be more logical to include pygments if the target audience are frequently writing markdown with code blocks. But that's a separate decision process anyways. |
I'd like to add support for Pygment code syntax highlighting -- but I am having trouble figuring out where in the plugin lifecycle this needs to happen. Any plugin documentation or examples you can point me to @koenbok please?
The text was updated successfully, but these errors were encountered: