diff options
author | Georg Brandl <georg@python.org> | 2016-02-02 10:59:47 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2016-02-02 10:59:47 +0100 |
commit | 7a8e90c6bc760d82d4b054730e928eeb9fbb4862 (patch) | |
tree | 4265ad18c8148c3c8d7124fc098644e880b97f54 /doc | |
parent | ca188017e9afdfe58b27633fe8bbab7cf373a166 (diff) | |
download | pygments-7a8e90c6bc760d82d4b054730e928eeb9fbb4862.tar.gz |
Document find_lexer_* functions.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/docs/api.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/docs/api.rst b/doc/docs/api.rst index 123a4643..dd831bd1 100644 --- a/doc/docs/api.rst +++ b/doc/docs/api.rst @@ -89,6 +89,21 @@ Functions from :mod:`pygments.lexers`: .. versionadded:: 0.6 +.. function:: find_lexer_class_by_name(alias) + + Return the `Lexer` subclass that has `alias` in its aliases list, without + instantiating it. + + Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is + found. + + .. versionadded:: 2.2 + +.. function:: find_lexer_class(name) + + Return the `Lexer` subclass that with the *name* attribute as given by + the *name* argument. + .. module:: pygments.formatters |