pygments.lexers.web

Lexers for web-related languages and markup.

copyright:Copyright 2006-2013 by the Pygments team, see AUTHORS.
license:BSD, see LICENSE for details.
class pygments.lexers.web.HtmlLexer(**options)[source]

For HTML 4 and XHTML 1 markup. Nested JavaScript and CSS is highlighted by the appropriate lexer.

class pygments.lexers.web.XmlLexer(**options)[source]

Generic lexer for XML (eXtensible Markup Language).

class pygments.lexers.web.JavascriptLexer(**options)[source]

For JavaScript source code.

class pygments.lexers.web.JsonLexer(**options)[source]

For JSON data structures.

New in Pygments 1.5.

class pygments.lexers.web.CssLexer(**options)[source]

For CSS (Cascading Style Sheets).

class pygments.lexers.web.PhpLexer(**options)[source]

For PHP source code. For PHP embedded in HTML, use the HtmlPhpLexer.

Additional options accepted:

startinline
If given and True the lexer starts highlighting with php code (i.e.: no starting <?php required). The default is False.
funcnamehighlighting
If given and True, highlight builtin function names (default: True).
disabledmodules

If given, must be a list of module names whose function names should not be highlighted. By default all modules are highlighted except the special 'unknown' module that includes functions that are known to php but are undocumented.

To get a list of allowed modules have a look into the _phpbuiltins module:

>>> from pygments.lexers._phpbuiltins import MODULES
>>> MODULES.keys()
['PHP Options/Info', 'Zip', 'dba', ...]

In fact the names of those modules match the module names from the php documentation.

class pygments.lexers.web.ActionScriptLexer(**options)[source]

For ActionScript source code.

New in Pygments 0.9.

class pygments.lexers.web.XsltLexer(**options)[source]

A lexer for XSLT.

New in Pygments 0.10.

class pygments.lexers.web.ActionScript3Lexer(**options)[source]

For ActionScript 3 source code.

New in Pygments 0.11.

class pygments.lexers.web.MxmlLexer(**options)[source]

For MXML markup. Nested AS3 in <script> tags is highlighted by the appropriate lexer.

New in Pygments 1.1.

class pygments.lexers.web.HaxeLexer(**options)[source]

For haXe source code (http://haxe.org/).

New in Pygments 1.3.

class pygments.lexers.web.HamlLexer(**options)[source]

For Haml markup.

New in Pygments 1.3.

class pygments.lexers.web.SassLexer(**options)[source]

For Sass stylesheets.

New in Pygments 1.3.

class pygments.lexers.web.ScssLexer(**options)[source]

For SCSS stylesheets.

class pygments.lexers.web.ObjectiveJLexer(**options)[source]

For Objective-J source code with preprocessor directives.

New in Pygments 1.3.

class pygments.lexers.web.CoffeeScriptLexer(**options)[source]

For CoffeeScript source code.

New in Pygments 1.3.

class pygments.lexers.web.LiveScriptLexer(**options)[source]

For LiveScript source code.

New in Pygments 1.6.

class pygments.lexers.web.DuelLexer(**options)[source]

Lexer for Duel Views Engine (formerly JBST) markup with JavaScript code blocks. See http://duelengine.org/. See http://jsonml.org/jbst/.

New in Pygments 1.4.

class pygments.lexers.web.ScamlLexer(**options)[source]

For Scaml markup. Scaml is Haml for Scala.

New in Pygments 1.4.

class pygments.lexers.web.JadeLexer(**options)[source]

For Jade markup. Jade is a variant of Scaml, see: http://scalate.fusesource.org/documentation/scaml-reference.html

New in Pygments 1.4.

class pygments.lexers.web.XQueryLexer(**options)[source]

An XQuery lexer, parsing a stream and outputting the tokens needed to highlight xquery code.

New in Pygments 1.4.

class pygments.lexers.web.DtdLexer(**options)[source]

A lexer for DTDs (Document Type Definitions).

New in Pygments 1.5.

class pygments.lexers.web.DartLexer(**options)[source]

For Dart source code.

New in Pygments 1.5.

class pygments.lexers.web.LassoLexer(**options)[source]

For Lasso source code, covering both Lasso 9 syntax and LassoScript for Lasso 8.6 and earlier. For Lasso embedded in HTML, use the LassoHtmlLexer.

Additional options accepted:

builtinshighlighting
If given and True, highlight builtin tags, types, traits, and methods (default: True).
requiredelimiters
If given and True, only highlight code between delimiters as Lasso (default: False).

New in Pygments 1.6.

class pygments.lexers.web.QmlLexer(**options)[source]

For QML files. See http://doc.qt.digia.com/4.7/qdeclarativeintroduction.html.

New in Pygments 1.6.

class pygments.lexers.web.TypeScriptLexer(**options)[source]

For TypeScript source code.

New in Pygments 1.6.

Project Versions

This Page