|
a/Allura/allura/controllers/static.py |
|
b/Allura/allura/controllers/static.py |
|
... |
|
... |
16 |
def markdown_to_html(self, markdown, neighborhood=None, project=None, app=None):
|
16 |
def markdown_to_html(self, markdown, neighborhood=None, project=None, app=None):
|
17 |
"""Convert markdown to html."""
|
17 |
"""Convert markdown to html."""
|
18 |
if neighborhood is None or project is None:
|
18 |
if neighborhood is None or project is None:
|
19 |
raise exc.HTTPBadRequest()
|
19 |
raise exc.HTTPBadRequest()
|
20 |
h.set_context(project, app, neighborhood=neighborhood)
|
20 |
h.set_context(project, app, neighborhood=neighborhood)
|
|
|
21 |
|
|
|
22 |
if app == 'wiki':
|
21 |
html = g.markdown_wiki.convert(markdown)
|
23 |
html = g.markdown_wiki.convert(markdown)
|
|
|
24 |
else:
|
|
|
25 |
html = g.markdown.convert(markdown)
|
22 |
return html
|
26 |
return html
|