https://github.com/facelessuser/pymdown-lexers
https://github.com/facelessuser/pymdown-lexers
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/facelessuser/pymdown-lexers
- Owner: facelessuser
- Created: 2014-11-23T06:05:14.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2022-05-20T23:15:19.000Z (about 4 years ago)
- Last Synced: 2025-03-27T08:01:45.043Z (over 1 year ago)
- Language: Python
- Size: 11.7 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pymdown-lexers
A package created to add additional lexers for use in Pygments. This package was created to be used in the
[PyMdown project](https://github.com/facelessuser/pymdown-extensions), but it can be used by anyone who wants to add the
contained styles to Pygments.
## Overview
The purpose of this package was to natively add the lexers to Pygments via a plugin. This was so that PyMdown could use
3rd party and native lexers without having to directly modify a Pygments installation.
The idea was to add the custom Pygments lexers here, and build a package that specifies the correct entry points. When
it is installed, the custom lexers can be used as if they were native.
I don't actually imagine many lexers will be added to this, but they are not needed to use pymdown-extensions.
## Included Lexers
Lexers | Description
------------ |------------
hex | A simple lexer to parse hex data in the form `address: 00 FF 00: ascii`.
criticmarkup | A simple lexer used in PyMdown documents to highlight CriticMarkup in a way that stands out in plain text.
csscolor | A lexer for CSS colors outside of CSS. Mainly used for the ColorAide project.
## Adding New Lexers
To add a new lexer, the lexer must be dropped into the `pymdown_lexers` folder. The `__init__.py` file must be updated
to expose the lexer. Lastly, `setup.py` must be modified to setup the entry points for the new lexer.