pythongithubmarkdownsyntax-highlightinggithub-flavored-markdown

Pip requirements syntax highlighting in GitHub markdown


According to GitHub syntax highlighting, keyword for pip requirements syntax highlighting can be found on languages.yml. According to the link, the keyword is Pip Requirements, but the following markdown snippet isn't highlighted on GitHub:

```Pip Requirements
pandas==2.2.3
```

How to syntax highlight pip requirements?


Solution

  • Use "pip-requirements" instead of "Pip Requirements":

    ```pip-requirements
    --editable .
    foo==1.2
    bar==3.4
    baz[quux]>=1.0.1
    ```
    

    It does not seem to render on Stack Overflow, but here is a screencap of markdown rendered from Github:

    1

    Source: https://gist.github.com/wimglenn/204dd744240848d8cbf2b9beb6eb4a83