##// END OF EJS Templates
markdown: enable gfm by default, this is much standard now and we should use it instead of plain markdown
marcink -
r318:388bda45 default
parent child Browse files
Show More
@@ -142,7 +142,7 b' class MarkupRenderer(object):'
142 return '<br />' + source.replace("\n", '<br />')
142 return '<br />' + source.replace("\n", '<br />')
143
143
144 @classmethod
144 @classmethod
145 def markdown(cls, source, safe=True, flavored=False, mentions=False):
145 def markdown(cls, source, safe=True, flavored=True, mentions=False):
146 # It does not allow to insert inline HTML. In presence of HTML tags, it
146 # It does not allow to insert inline HTML. In presence of HTML tags, it
147 # will replace them instead with [HTML_REMOVED]. This is controlled by
147 # will replace them instead with [HTML_REMOVED]. This is controlled by
148 # the safe_mode=True parameter of the markdown method.
148 # the safe_mode=True parameter of the markdown method.
@@ -170,7 +170,7 b' class MarkupRenderer(object):'
170 except Exception:
170 except Exception:
171 log.exception('Error when rendering Markdown')
171 log.exception('Error when rendering Markdown')
172 if safe:
172 if safe:
173 log.debug('Fallbacking to render in plain mode')
173 log.debug('Fallback to render in plain mode')
174 return cls.plain(source)
174 return cls.plain(source)
175 else:
175 else:
176 raise
176 raise
@@ -189,8 +189,9 b' class MarkupRenderer(object):'
189
189
190 source = safe_unicode(source)
190 source = safe_unicode(source)
191 try:
191 try:
192 docutils_settings = dict([(alias, None) for alias in
192 docutils_settings = dict(
193 cls.RESTRUCTUREDTEXT_DISALLOWED_DIRECTIVES])
193 [(alias, None) for alias in
194 cls.RESTRUCTUREDTEXT_DISALLOWED_DIRECTIVES])
194
195
195 docutils_settings.update({'input_encoding': 'unicode',
196 docutils_settings.update({'input_encoding': 'unicode',
196 'report_level': 4})
197 'report_level': 4})
General Comments 0
You need to be logged in to leave comments. Login now