From 4c88fe5a2efc7cc6a5412966aa44fb80f19415aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Mon, 3 May 2010 15:43:00 +0200 Subject: Change code to be run in a multiple-app env --- highlighting.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'highlighting.py') diff --git a/highlighting.py b/highlighting.py index f859920..439ae78 100644 --- a/highlighting.py +++ b/highlighting.py @@ -7,13 +7,11 @@ formatter = HtmlFormatter(encoding = "utf-8", classprefix="pygm", nowrap=True) BashLexer.tokens["basic"].append((r'\b(emerge|layman|git(?!:))\s*\b(?!\.)', Name.Builtin)) -def highlight(context, code, lang): +def highlight(code, lang): l = get_lexer_by_name(lang, encoding = "utf-8") - context.write(pygHighlight(code, l, formatter)) - return '' + return pygHighlight(code, l, formatter) -def get_css(context): - context.write("""""" % formatter.get_style_defs()) - return '' +""" % formatter.get_style_defs() -- cgit v1.2.3