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/installers.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/installers.py')
-rw-r--r-- | pygments/lexers/installers.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pygments/lexers/installers.py b/pygments/lexers/installers.py index 89225bfc..e2013b21 100644 --- a/pygments/lexers/installers.py +++ b/pygments/lexers/installers.py @@ -20,11 +20,12 @@ __all__ = ['NSISLexer', 'RPMSpecLexer', 'SourcesListLexer', class NSISLexer(RegexLexer): """ - For `NSIS <http://nsis.sourceforge.net/>`_ scripts. + For NSIS scripts. .. versionadded:: 1.6 """ name = 'NSIS' + url = 'http://nsis.sourceforge.net/' aliases = ['nsis', 'nsi', 'nsh'] filenames = ['*.nsi', '*.nsh'] mimetypes = ['text/x-nsis'] @@ -269,12 +270,10 @@ class DebianControlLexer(RegexLexer): """ Lexer for Debian ``control`` files and ``apt-cache show <pkg>`` outputs. - Specification of `control`` files is available at - https://www.debian.org/doc/debian-policy/ch-controlfields.html - .. versionadded:: 0.9 """ name = 'Debian Control file' + url = 'https://www.debian.org/doc/debian-policy/ch-controlfields.html' aliases = ['debcontrol', 'control'] filenames = ['control'] |