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

Syntax highlighting does not respect language specified #45

Open
nathancarter opened this issue Jul 8, 2020 · 0 comments
Open

Syntax highlighting does not respect language specified #45

nathancarter opened this issue Jul 8, 2020 · 0 comments

Comments

@nathancarter
Copy link

In the windmill theme, try writing a page containing the following code block:

```sh
git clone https://github.com/gristlabs/mkdocs-windmill.git
```

It will ignore the language specification and attempt to guess the language instead, probably arriving at some conclusion like "vim" and highlighting the s: in the URL blue (!).

For two years, mkdocs has supported disabling highlight.js, which is great because highlight.js insists on guessing the code language, ignoring the user's explicit direction, and guesses something silly, as in the example above. In all built-in mkdocs themes, you can do:

theme:
    highlightjs: false

markdown_extensions:
    - codehilite

extra_css:
    - css/code_styles.css

Please add support for this to windmill.

To see how mkdocs did it for their themes, check out, for example, this PR.

Thanks!

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

1 participant