mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 06:24:23 +01:00
Switch from mistune to cmarkgfm (#1414)
* Switch from mistune to cmarkgfm * Starts work on #1317 * Update markdown test to be commonmark compliant
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import mistune
|
||||
import cmarkgfm
|
||||
import six
|
||||
from flask import current_app as app
|
||||
|
||||
@@ -13,7 +13,7 @@ else:
|
||||
text_type = str
|
||||
binary_type = bytes
|
||||
|
||||
markdown = mistune.Markdown()
|
||||
markdown = cmarkgfm.github_flavored_markdown_to_html
|
||||
|
||||
|
||||
def get_app_config(key, default=None):
|
||||
|
||||
@@ -14,7 +14,7 @@ requests>=2.20.0
|
||||
PyMySQL==0.9.3
|
||||
gunicorn==19.10.0
|
||||
dataset==1.1.2
|
||||
mistune==0.8.4
|
||||
cmarkgfm==0.4.2
|
||||
netaddr==0.7.19
|
||||
redis==3.3.11
|
||||
gevent==1.4.0
|
||||
|
||||
@@ -154,7 +154,7 @@ def test_pages_routing_and_rendering():
|
||||
"""Test that pages are routing and rendering"""
|
||||
app = create_ctfd()
|
||||
with app.app_context():
|
||||
html = """##The quick brown fox jumped over the lazy dog"""
|
||||
html = """## The quick brown fox jumped over the lazy dog"""
|
||||
route = "test"
|
||||
title = "Test"
|
||||
gen_page(app.db, title, route, html)
|
||||
|
||||
Reference in New Issue
Block a user