Update markdown preprocessor registration

This commit is contained in:
Mark Cabanero 2019-01-18 14:47:00 -05:00 committed by Ryan P Kilby
parent 6aac9d2be1
commit 9de1226dca
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
# Optional packages which may be used with REST framework.
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-filter>=2.1.0, <2.2
coreapi==2.3.1

View File

@ -206,7 +206,7 @@ if markdown is not None and pygments is not None:
return ret.split("\n")
def md_filter_add_syntax_highlight(md):
md.preprocessors.add('highlight', CodeBlockPreprocessor(), "_begin")
md.preprocessors.register(CodeBlockPreprocessor(), 'highlight', 40)
return True
else:
def md_filter_add_syntax_highlight(md):