Skip to content

Syntax highlighting does not respect language specified #45

Description

@nathancarter

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions