##// END OF EJS Templates
markup-renderers: fixed code highlite for rst
marcink -
r4117:81d225a3 default
parent child Browse files
Show More
@@ -53,6 +53,8 b' class CustomHTMLTranslator(writers.html4'
53 Custom HTML Translator used for sandboxing potential
53 Custom HTML Translator used for sandboxing potential
54 JS injections in ref links
54 JS injections in ref links
55 """
55 """
56 def visit_literal_block(self, node):
57 self.body.append(self.starttag(node, 'pre', CLASS='codehilite literal-block'))
56
58
57 def visit_reference(self, node):
59 def visit_reference(self, node):
58 if 'refuri' in node.attributes:
60 if 'refuri' in node.attributes:
@@ -423,7 +425,10 b' class MarkupRenderer(object):'
423 cls.RESTRUCTUREDTEXT_DISALLOWED_DIRECTIVES])
425 cls.RESTRUCTUREDTEXT_DISALLOWED_DIRECTIVES])
424
426
425 docutils_settings.update({
427 docutils_settings.update({
426 'input_encoding': 'unicode', 'report_level': 4})
428 'input_encoding': 'unicode',
429 'report_level': 4,
430 'syntax_highlight': 'short',
431 })
427
432
428 for k, v in docutils_settings.iteritems():
433 for k, v in docutils_settings.iteritems():
429 directives.register_directive(k, v)
434 directives.register_directive(k, v)
General Comments 0
You need to be logged in to leave comments. Login now