mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 17:39:48 +03:00
Update markdown preprocessor registration
This commit is contained in:
parent
6aac9d2be1
commit
9de1226dca
|
@ -1,6 +1,7 @@
|
||||||
# Optional packages which may be used with REST framework.
|
# Optional packages which may be used with REST framework.
|
||||||
psycopg2-binary>=2.8.2, <2.9
|
psycopg2-binary>=2.8.2, <2.9
|
||||||
markdown==2.6.11
|
markdown==3.1.1
|
||||||
|
pygments==2.4.2
|
||||||
django-guardian==1.5.0
|
django-guardian==1.5.0
|
||||||
django-filter>=2.1.0, <2.2
|
django-filter>=2.1.0, <2.2
|
||||||
coreapi==2.3.1
|
coreapi==2.3.1
|
||||||
|
|
|
@ -206,7 +206,7 @@ if markdown is not None and pygments is not None:
|
||||||
return ret.split("\n")
|
return ret.split("\n")
|
||||||
|
|
||||||
def md_filter_add_syntax_highlight(md):
|
def md_filter_add_syntax_highlight(md):
|
||||||
md.preprocessors.add('highlight', CodeBlockPreprocessor(), "_begin")
|
md.preprocessors.register(CodeBlockPreprocessor(), 'highlight', 40)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
def md_filter_add_syntax_highlight(md):
|
def md_filter_add_syntax_highlight(md):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user