diff options
author | gbrandl <devnull@localhost> | 2006-10-28 11:29:51 +0200 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2006-10-28 11:29:51 +0200 |
commit | 7643e3657c557da72dada0f3ae3700b8a255206c (patch) | |
tree | 9e80ce4e402c3f85d7bacf1e761ab9b947c0552e | |
parent | 4b9bb3ddd402107a42dbfeeb671bb0c2ecdb9e90 (diff) | |
download | pygments-7643e3657c557da72dada0f3ae3700b8a255206c.tar.gz |
[svn] update TODO.
-rw-r--r-- | TODO | 41 | ||||
-rw-r--r-- | pygments/lexer.py | 6 | ||||
-rw-r--r-- | pygments/lexers/__init__.py | 2 | ||||
-rw-r--r-- | pygments/util.py | 3 |
4 files changed, 34 insertions, 18 deletions
@@ -1,17 +1,37 @@ Todo ==== +before 0.5 +---------- + +- add mimetype attributes +- improve guess_lexer heuristics (esp. for template langs) + +- more unit tests + +- docstrings? + +- goto label HL support for languages that use it + +- tell the PHP and DelphiLexer how to differ between Operators and + text. + +for 0.6 +------- + - allow multiple token types per regex (done, but awkwardly) - allow "overlay" token types (e.g. Diff + X) - highlight specials: nth line, a word etc. - dhtml: overlays toggleable by javascript -- unit tests - -- docstrings? - - lexers: - * HTML with special formatting + * BASIC + * apacheconf + * python TBs + * haskell + * ls -alG + * python help() ? + * HTML with special formatting? * ocaml * nemerle * scheme/lisp @@ -22,22 +42,19 @@ Todo * mysql/postgresql/sqlite * tcl * (la)tex - * django templates - -- goto label HL support for languages that use it - add a `Punctuation` token type for symbols that are not text but also not a symbol (blocks in ruby etc) - add support for function name highlighting to c++ lexer -- styles should be able to define the overall background color - -- tell the DelphiLexer how to differ between Operators and - text. +- readd property support for C# lexer - review perl lexer (numerous bugs) +for 0.7 +------- + - moin parser - add folding? would require more language-aware parsers... diff --git a/pygments/lexer.py b/pygments/lexer.py index b5320ce2..049b2868 100644 --- a/pygments/lexer.py +++ b/pygments/lexer.py @@ -67,9 +67,9 @@ class Lexer(object): def analyse_text(text): """ - Has to return an float between ``0`` and ``1`` that indicates - if a lexer wants to highighlight that. used by ``guess_lexer``. - If this method returns ``0`` it won't highlight it at all, if + Has to return a float between ``0`` and ``1`` that indicates + if a lexer wants to highlight this text. Used by ``guess_lexer``. + If this method returns ``0`` it won't highlight it in any case, if it returns ``1`` highlighting with this lexer is guaranteed. The `LexerMeta` metaclass automatically wraps this function so diff --git a/pygments/lexers/__init__.py b/pygments/lexers/__init__.py index 0f7c0483..b102076d 100644 --- a/pygments/lexers/__init__.py +++ b/pygments/lexers/__init__.py @@ -98,9 +98,9 @@ def guess_lexer(text, **options): class _automodule(types.ModuleType): + """Automatically import lexers.""" def __getattr__(self, name): - """Automatically import lexers.""" info = LEXERS.get(name) if info: _load_lexers(info[0]) diff --git a/pygments/util.py b/pygments/util.py index 8ad994c6..9c84e8dc 100644 --- a/pygments/util.py +++ b/pygments/util.py @@ -3,8 +3,7 @@ pygments.util ~~~~~~~~~~~~~ - Utility functions, currently only for parsing lexer - and formatter options. + Utility functions. :copyright: 2006 by Georg Brandl. :license: GNU LGPL, see LICENSE for more details. |