Пример #1
0
def send_processed_markdown():
    server = ShorthandServer(current_app.config['config_path'])
    note_path = request.args.get('path')
    file_content = server.get_note(note_path)
    file_content, toc_content = get_rendered_markdown(file_content, note_path)
    return json.dumps({
        'file_content': file_content,
        'toc_content': toc_content
    })
Пример #2
0
def get_full_note():
    server = ShorthandServer(current_app.config['config_path'])
    path = get_request_argument(request.args, name='path', required=True)
    return server.get_note(path)