diff --git a/rest_framework/compat.py b/rest_framework/compat.py index 239ef3def..ce821402e 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -244,7 +244,7 @@ if markdown is not None and pygments is not None: class CodeBlockPreprocessor(Preprocessor): pattern = re.compile( - r'^\s*``` ([^\n]+)\n(.+?)^\s*```', re.M|re.S) + r'^\s*``` *([^\n]+)\n(.+?)^\s*```', re.M|re.S) formatter = HtmlFormatter() diff --git a/tests/test_description.py b/tests/test_description.py index 3e9034344..4804168ab 100644 --- a/tests/test_description.py +++ b/tests/test_description.py @@ -112,7 +112,6 @@ class TestViewNamesAndDescriptions(TestCase): }] ```""" - print("MOCK:\n[%s]" % MockView().get_view_description()) assert MockView().get_view_description() == DESCRIPTION def test_view_description_can_be_empty(self):