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

Make syntax highlighting optional #183

Closed
idleberg opened this issue Oct 30, 2014 · 13 comments
Closed

Make syntax highlighting optional #183

idleberg opened this issue Oct 30, 2014 · 13 comments
Milestone

Comments

@idleberg
Copy link

It would be nice to have an option to disable the prettify class from being added to the pre-tag. Personally, I prefer using another highlighter that doesn't rely on extra classes.

@d0ugal
Copy link
Member

d0ugal commented Oct 30, 2014

Are you adding your own highlighter with the extra css?

@idleberg
Copy link
Author

So far, I was only running a couple of tests on an early custom theme and noticed those classes get added. Eventually, I will use extra_css to load highlight.js — but I don't see how that influences the prettify inclusion.

@d0ugal
Copy link
Member

d0ugal commented Oct 30, 2014

Just trying to fully understand the use case. I think this probably makes sense, I'm just trying to think how we best do it without adding more and more config options.

@tomchristie
Copy link
Contributor

Isn't the hightlighting entirely dependant on the theme - is using a custom theme the right answer here?

@d0ugal
Copy link
Member

d0ugal commented Oct 30, 2014

The problem is, we mess with peoples HTML.

https://github.com/tomchristie/mkdocs/blob/master/mkdocs/build.py#L86

@idleberg
Copy link
Author

If you don't like adding more config options, then maybe a switch (e.g. --no-prettify) works better?

@tomchristie
Copy link
Contributor

Ideally we ought to tweak the default css/javascript so it doesn't require us to postprocess the html in that way.

maybe a switch (e.g. --no-prettify) works better?

Nah. Extra switches are not any better than extra config.

@d0ugal
Copy link
Member

d0ugal commented Oct 30, 2014

+1 to fixing the default css. Should just be a case of changing https://github.com/tomchristie/mkdocs/blob/master/mkdocs/themes/mkdocs/css/prettify-1.0.css

@d0ugal
Copy link
Member

d0ugal commented Oct 30, 2014

... and removing the hack in the code of course :)

@tomchristie
Copy link
Contributor

@d0ugal May also be some javascript that keys into that?

@d0ugal
Copy link
Member

d0ugal commented Oct 30, 2014

@idleberg idleberg closed this as completed Nov 3, 2014
@idleberg
Copy link
Author

idleberg commented Nov 3, 2014

Awesome, will check it out when I get home

@idleberg
Copy link
Author

idleberg commented Nov 4, 2014

Works, thanks a lot guys!

d0ugal added a commit that referenced this issue Nov 6, 2014
@d0ugal d0ugal added this to the 0.11.0 milestone Nov 7, 2014
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

3 participants