Changeset 1770
- Timestamp:
- 09/20/08 16:43:41 (18 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/pylucid_project/PyLucid/system/hightlighter.py
r1634 r1770 35 35 36 36 HTML = ( 37 '<fieldset class="pygments_code">\n'37 u'<fieldset class="pygments_code">\n' 38 38 '<legend class="pygments_code">%(lexer_name)s</legend>' 39 39 '%(code_html)s' 40 40 '</fieldset>\n' 41 41 ) 42 CSSCLASS = "pygments"42 CSSCLASS = u"pygments" 43 43 44 44 def make_html(sourcecode, source_type): … … 48 48 49 49 def no_hightlight(code): 50 html = '\n<pre><code>%s</code></pre>\n' % escape(code)50 html = u'\n<pre><code>%s</code></pre>\n' % escape(code) 51 51 return html 52 52 … … 76 76 except lexers.ClassNotFound, err: 77 77 info = _("unknown type") 78 lexer_name = '<small title="%s">%s</small>' % (err, info)78 lexer_name = u'<small title="%s">%s</small>' % (err, info) 79 79 html = no_hightlight(sourcecode) 80 80 return html, lexer_name