Resolve @mentions in markdown preview endpoint
Pass dbsession to markdown_to_html so @username mentions are converted to profile links during live preview, not just on save.
This commit is contained in:
parent
8260897aeb
commit
c93647e2b7
1 changed files with 2 additions and 1 deletions
|
|
@ -56,7 +56,8 @@ def redirect_to_root(request):
|
|||
def preview_post(request):
|
||||
"""AJAJ: Accept MarkDown data param, return HTML"""
|
||||
try:
|
||||
return markdown_to_html(request.params["data"], request.namespace)
|
||||
return markdown_to_html(request.params["data"], request.namespace,
|
||||
dbsession=request.dbsession)
|
||||
except:
|
||||
return "we could not create markdown to html preview."
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue