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

Cannot figure out how to enable code highlights? #656

Closed
Serhioromano opened this issue Jan 8, 2018 · 5 comments
Closed

Cannot figure out how to enable code highlights? #656

Serhioromano opened this issue Jan 8, 2018 · 5 comments

Comments

@Serhioromano
Copy link

All my code examples that was perfectly highlighted readthedoc and default them, are now not highlighted at all. I use ```php to insert codes.

@martinbira
Copy link
Sponsor Contributor

Is Pygments and CodeHilite installed and added to your mkdocs.yml?

https://squidfunk.github.io/mkdocs-material/extensions/codehilite/

markdown_extensions:
  - codehilite:

@Serhioromano
Copy link
Author

Yep, I had that and Pygment installed. I've found that even in default template particulary php is not working. If I start code with <?php then it highlights but if I start PHP code right away, it does not highlight.

@martinbira
Copy link
Sponsor Contributor

Could be something with Pygments then?
http://pygments.org/docs/lexers/?highlight=php#lexers-for-php-and-related-languages

startinline
If given and True the lexer starts highlighting with php code (i.e.: no starting <?php required). The default is False.

@Serhioromano
Copy link
Author

I see. Thank you.

@facelessuser
Copy link
Contributor

There is a way to get PHP to highlight without <?php. See #506.

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