summaryrefslogtreecommitdiff
path: root/pygments/lexer.py
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2007-02-12 23:38:46 +0100
committergbrandl <devnull@localhost>2007-02-12 23:38:46 +0100
commit8ac95bf314343f8db0ec8123296b60aefda8b02f (patch)
tree7813371046f03132d690b8556c857fc453e6c9b6 /pygments/lexer.py
parent16b1f0bb0fbc6ea7aab974cb220406632de4c7c0 (diff)
downloadpygments-8ac95bf314343f8db0ec8123296b60aefda8b02f.tar.gz
[svn] Quite a few things:
- new pygmentize options, -F for filters and -H for detail help. - an automatically-created formatter map - better HTML formatter subclassing
Diffstat (limited to 'pygments/lexer.py')
-rw-r--r--pygments/lexer.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexer.py b/pygments/lexer.py
index 5f1e6ab1..6cec28f8 100644
--- a/pygments/lexer.py
+++ b/pygments/lexer.py
@@ -16,7 +16,7 @@ except NameError:
from sets import Set as set
from pygments.filter import apply_filters, Filter
-from pygments.filters import find_filter
+from pygments.filters import get_filter_by_name
from pygments.token import Error, Text, Other, _TokenType
from pygments.util import get_bool_opt, get_int_opt, get_list_opt, \
make_analysator
@@ -101,7 +101,7 @@ class Lexer(object):
Add a new stream filter to this lexer.
"""
if not isinstance(filter, Filter):
- filter = find_filter(filter, **options)
+ filter = get_filter_by_name(filter, **options)
self.filters.append(filter)
def analyse_text(text):
@@ -121,8 +121,8 @@ class Lexer(object):
def get_tokens(self, text, unfiltered=False):
"""
Return an iterable of (tokentype, value) pairs generated from
- `text`. If `unfiltered` is set to `True` the filtering mechanism
- is bypassed, even if filters are defined.
+ `text`. If `unfiltered` is set to `True`, the filtering mechanism
+ is bypassed even if filters are defined.
Also preprocess the text, i.e. expand tabs and strip it if
wanted and applies registered filters.