Changeset 1299
- Timestamp:
- 10/30/07 16:31:54 (13 months ago)
- Location:
- trunk/pylucid/PyLucid
- Files:
-
- 2 modified
-
system/hightlighter.py (modified) (4 diffs)
-
tools/content_processors.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pylucid/PyLucid/system/hightlighter.py
r1280 r1299 1 1 2 from PyLucid.tools.content_processors import escape 2 from PyLucid.tools.content_processors import escape, escape_django_tags 3 3 4 4 from django.conf import settings … … 21 21 '</fieldset>' 22 22 ) 23 CSSCLASS = "pygments" 23 24 24 25 def make_html(sourcecode, source_type): … … 54 55 55 56 formatter = HtmlFormatter( 56 linenos=True, encoding="utf-8", style='colorful' 57 linenos=True, encoding="utf-8", style='colorful', 58 cssclass = CSSCLASS, 57 59 ) 58 60 59 stylesheet = formatter.get_style_defs('.pygments_code')61 #stylesheet = formatter.get_style_defs(CSSCLASS) 60 62 61 63 # self.context["css_data"].append({ … … 68 70 html = out_object.getvalue() 69 71 72 # If there is e.g. html code with django tags, we must escape this: 73 html = escape_django_tags(html) 74 70 75 return html, lexer_name 71 76 -
trunk/pylucid/PyLucid/tools/content_processors.py
r1283 r1299 149 149 from xml.sax.saxutils import escape as sax_escape 150 150 ENTITIES = { 151 # &#x7B;% lucidTag RSS url="http url" title="a feed" %&#x7D; 152 "{" : "{", 153 "}" : "}", 151 "{{" : "{{", 152 "}}" : "}}", 153 "{%" : "{%", 154 "%}" : "%}", 154 155 } 155 156 def escape(txt):
