diff options
author | Matthäus G. Chajdas <dev@anteru.net> | 2022-03-20 10:29:30 +0100 |
---|---|---|
committer | Matthäus G. Chajdas <dev@anteru.net> | 2022-03-20 10:29:30 +0100 |
commit | 64e8e05307689fe726ce9df2d5907e9c2fb67405 (patch) | |
tree | 1d2f1eb768972ac49933367b9ec127e638cb7466 /pygments/lexers/theorem.py | |
parent | 96eaebafc848c989e9fc081768e3156add3128fd (diff) | |
download | pygments-git-64e8e05307689fe726ce9df2d5907e9c2fb67405.tar.gz |
Rework URL information in lexers.
This commit adds a new url field to a lexer, which can be used to link
to the language website, instead of relying on having the link in either
languages.rst or the docstring of the lexer. Additionally, it changes the
languages.rst file to auto-generate the list of lexers from the actual
source code, using the provided URL.
Diffstat (limited to 'pygments/lexers/theorem.py')
-rw-r--r-- | pygments/lexers/theorem.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pygments/lexers/theorem.py b/pygments/lexers/theorem.py index f5096ef6..e4ed7539 100644 --- a/pygments/lexers/theorem.py +++ b/pygments/lexers/theorem.py @@ -19,12 +19,13 @@ __all__ = ['CoqLexer', 'IsabelleLexer', 'LeanLexer'] class CoqLexer(RegexLexer): """ - For the `Coq <http://coq.inria.fr/>`_ theorem prover. + For the Coq theorem prover. .. versionadded:: 1.5 """ name = 'Coq' + url = 'http://coq.inria.fr/' aliases = ['coq'] filenames = ['*.v'] mimetypes = ['text/x-coq'] @@ -165,12 +166,13 @@ class CoqLexer(RegexLexer): class IsabelleLexer(RegexLexer): """ - For the `Isabelle <http://isabelle.in.tum.de/>`_ proof assistant. + For the Isabelle proof assistant. .. versionadded:: 2.0 """ name = 'Isabelle' + url = 'http://isabelle.in.tum.de/' aliases = ['isabelle'] filenames = ['*.thy'] mimetypes = ['text/x-isabelle'] @@ -381,12 +383,12 @@ class IsabelleLexer(RegexLexer): class LeanLexer(RegexLexer): """ - For the `Lean <https://github.com/leanprover/lean>`_ - theorem prover. + For the Lean theorem prover. .. versionadded:: 2.0 """ name = 'Lean' + url = 'https://github.com/leanprover/lean' aliases = ['lean'] filenames = ['*.lean'] mimetypes = ['text/x-lean'] |