423 md.inlinePatterns.add('del', del_tag, '>not_strong') |
423 md.inlinePatterns.add('del', del_tag, '>not_strong') |
424 |
424 |
425 extensions.append(_StrikeThroughExtension()) |
425 extensions.append(_StrikeThroughExtension()) |
426 |
426 |
427 try: |
427 try: |
428 return markdown.markdown(text, extensions + ['mathjax']) |
428 return markdown.markdown(text, extensions + ['mathjax']) |
429 except (ImportError, ValueError): |
429 except (ImportError, ValueError): |
430 # markdown raises ValueError or ImportError, depends on version |
430 # markdown raises ValueError or ImportError, depends on version |
431 # It is not clear, how to distinguish missing mathjax from other |
431 # It is not clear, how to distinguish missing mathjax from other |
432 # errors. So keep going without mathjax. |
432 # errors. So keep going without mathjax. |
433 return markdown.markdown(text, extensions) |
433 return markdown.markdown(text, extensions) |