pygments.lexers.text
Lexers for non-source code file types.
| copyright: | Copyright 2006-2013 by the Pygments team, see AUTHORS. |
| license: | BSD, see LICENSE for details. |
-
class pygments.lexers.text.IniLexer(**options)[source]
Lexer for configuration files in INI style.
-
class pygments.lexers.text.PropertiesLexer(**options)[source]
Lexer for configuration files in Java’s properties format.
New in Pygments 1.4.
-
class pygments.lexers.text.SourcesListLexer(**options)[source]
Lexer that highlights debian sources.list files.
New in Pygments 0.7.
-
class pygments.lexers.text.BaseMakefileLexer(**options)[source]
Lexer for simple Makefiles (no preprocessing).
New in Pygments 0.10.
-
class pygments.lexers.text.MakefileLexer(**options)[source]
Lexer for BSD and GNU make extensions (lenient enough to handle both in
the same file even).
Rewritten in Pygments 0.10.
-
class pygments.lexers.text.DiffLexer(**options)[source]
Lexer for unified or context-style diffs or patches.
-
class pygments.lexers.text.IrcLogsLexer(**options)[source]
Lexer for IRC logs in irssi, xchat or weechat style.
-
class pygments.lexers.text.TexLexer(**options)[source]
Lexer for the TeX and LaTeX typesetting languages.
-
class pygments.lexers.text.GroffLexer(**options)[source]
Lexer for the (g)roff typesetting language, supporting groff
extensions. Mainly useful for highlighting manpage sources.
New in Pygments 0.6.
-
class pygments.lexers.text.ApacheConfLexer(**options)[source]
Lexer for configuration files following the Apache config file
format.
New in Pygments 0.6.
-
class pygments.lexers.text.BBCodeLexer(**options)[source]
A lexer that highlights BBCode(-like) syntax.
New in Pygments 0.6.
-
class pygments.lexers.text.MoinWikiLexer(**options)[source]
For MoinMoin (and Trac) Wiki markup.
New in Pygments 0.7.
-
class pygments.lexers.text.RstLexer(**options)[source]
For reStructuredText markup.
New in Pygments 0.7.
Additional options accepted:
- handlecodeblocks
- Highlight the contents of .. sourcecode:: langauge and
.. code:: language directives with a lexer for the given
language (default: True). New in Pygments 0.8.
-
class pygments.lexers.text.VimLexer(**options)[source]
Lexer for VimL script files.
New in Pygments 0.8.
-
is_in(w, mapping)[source]
It’s kind of difficult to decide if something might be a keyword
in VimL because it allows you to abbreviate them. In fact,
‘ab[breviate]’ is a good example. :ab, :abbre, or :abbreviate are
valid ways to call it so rather than making really awful regexps
like:
\bab(?:b(?:r(?:e(?:v(?:i(?:a(?:t(?:e)?)?)?)?)?)?)?)?\b
we match bw+b and then call is_in() on those tokens. See
scripts/get_vimkw.py for how the lists are extracted.
-
class pygments.lexers.text.GettextLexer(**options)[source]
Lexer for Gettext catalog files.
New in Pygments 0.9.
-
class pygments.lexers.text.SquidConfLexer(**options)[source]
Lexer for squid configuration files.
New in Pygments 0.9.
-
class pygments.lexers.text.DebianControlLexer(**options)[source]
Lexer for Debian control files and apt-cache show <pkg> outputs.
New in Pygments 0.9.
-
class pygments.lexers.text.DarcsPatchLexer(**options)[source]
DarcsPatchLexer is a lexer for the various versions of the darcs patch
format. Examples of this format are derived by commands such as
darcs annotate --patch and darcs send.
New in Pygments 0.10.
-
class pygments.lexers.text.YamlLexer(**options)[source]
Lexer for YAML, a human-friendly data serialization
language.
New in Pygments 0.11.
-
parse_block_scalar_empty_line(indent_token_class, content_token_class)[source]
Process an empty line in a block scalar.
-
parse_block_scalar_indent(token_class)[source]
Process indentation spaces in a block scalar.
-
parse_plain_scalar_indent(token_class)[source]
Process indentation spaces in a plain scalar.
-
reset_indent(token_class)[source]
Reset the indentation levels.
-
save_indent(token_class, start=False)[source]
Save a possible indentation level.
-
set_block_scalar_indent(token_class)[source]
Set an explicit indentation level for a block scalar.
-
set_indent(token_class, implicit=False)[source]
Set the previously saved indentation level.
-
something(token_class)[source]
Do not produce empty tokens.
-
class pygments.lexers.text.LighttpdConfLexer(**options)[source]
Lexer for Lighttpd configuration files.
New in Pygments 0.11.
-
class pygments.lexers.text.NginxConfLexer(**options)[source]
Lexer for Nginx configuration files.
New in Pygments 0.11.
-
class pygments.lexers.text.CMakeLexer(**options)[source]
Lexer for CMake files.
New in Pygments 1.2.
-
class pygments.lexers.text.HttpLexer(**options)[source]
Lexer for HTTP sessions.
New in Pygments 1.5.
-
class pygments.lexers.text.PyPyLogLexer(**options)[source]
Lexer for PyPy log files.
New in Pygments 1.5.
-
class pygments.lexers.text.RegeditLexer(**options)[source]
Lexer for Windows Registry files produced
by regedit.
New in Pygments 1.6.
-
class pygments.lexers.text.HxmlLexer(**options)[source]
Lexer for haXe build files.
New in Pygments 1.6.