show markdown by default

This commit is contained in:
Martin Zimmermann 2013-09-09 14:14:27 +02:00
parent b65b86d664
commit 88b77ffa2d

View File

@ -93,12 +93,12 @@ def get(app, environ, request, uri):
if not rv: if not rv:
abort(404) abort(404)
if request.args.get('plain', '1') == '0': if request.args.get('plain', '0') == '0':
if isinstance(rv, list): if isinstance(rv, list):
for item in rv: for item in rv:
item.text = app.markdown(item.text) item['text'] = app.markdown(item['text'])
else: else:
rv.text = app.markdown(rv.text) rv['text'] = app.markdown(rv['text'])
return Response(app.dumps(rv), 200, content_type='application/json') return Response(app.dumps(rv), 200, content_type='application/json')