[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Please review Pygments lexer and style
From: |
Jean Abou Samra |
Subject: |
Please review Pygments lexer and style |
Date: |
Wed, 23 Jun 2021 09:58:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
Hello,
Pygments is a Python syntax highlighter supporting many
languages, used by Sphinx-documented projects, users of
the 'minted' LaTeX package, Wikipedia, and various websites.
I'd like to see Pygments supporting LilyPond. Here is my
pull request (the equivalent of a merge request, on GitHub):
https://github.com/pygments/pygments/pull/1845
(Note that there is a previous attempt,
https://github.com/pygments/pygments/pull/1371. However,
it is far less precise, does not understand Scheme, and,
above all, reuses code covered by the GPL from Frescobaldi,
making it unsuitable for inclusion in the BSD-licensed
Pygments.)
Reviews and testing would be appreciated. In particular,
if you would not like to have a later unpleasant surprise
with my aesthetic choices, please give the style a look;
the eventual goal would be to make this used in our
documentation. The setup to start testing is
(assuming Python 3 installed):
git clone https://github.com/Jean-Abou-Samra/pygments.git
cd pygments
git checkout lilypond
python3 -m venv pygments-env
source pygments-env/bin/activate
pip install -r requirements.txt
Then you can highlight file.ly, outputting to file.html,
using
python -m pygments -f html -O full,style=lilypond file.ly > file.html
(If you begin a new session of testing, don't forget
to start with 'source pygments-env/bin/activate'.)
To whet your appetite, a highlighted version of the test
file included in the PR is attached.
Cheers,
Jean
example.html
Description: Text document
example.ly
Description: Text Data
- Please review Pygments lexer and style,
Jean Abou Samra <=
- Re: Please review Pygments lexer and style, Jean Abou Samra, 2021/06/23
- Re: Please review Pygments lexer and style, Dan Eble, 2021/06/23
- Re: Please review Pygments lexer and style, Jean Abou Samra, 2021/06/23
- Re: Please review Pygments lexer and style, Jean Abou Samra, 2021/06/24
- Re: Please review Pygments lexer and style, Jonas Hahnfeld, 2021/06/24
- Re: Please review Pygments lexer and style, Jean Abou Samra, 2021/06/24
- Re: Please review Pygments lexer and style, Dan Eble, 2021/06/24
- Re: Please review Pygments lexer and style, Benkő Pál, 2021/06/27
- Re: Please review Pygments lexer and style, David Kastrup, 2021/06/27