[svn] implemented {% raw %} and improved jinja/django highlighter
--HG--
branch : trunk
diff --git a/jdebug.py b/jdebug.py
index 95f10cc..5de8815 100644
--- a/jdebug.py
+++ b/jdebug.py
@@ -10,13 +10,18 @@
"""
from jinja import Environment
from jinja.parser import Parser
+from jinja.lexer import Lexer
from jinja.translators.python import PythonTranslator
-__all__ = ['e', 't', 'p']
+__all__ = ['e', 't', 'p', 'l']
e = Environment()
t = e.from_string
def p(x):
print PythonTranslator(e, Parser(e, x).parse()).translate()
+
+def l(x):
+ for item in e.lexer.tokenize(x):
+ print '%5s %-20s %r' % item