From 98a087e13350d6649f4a1c5eb38e47d949f7ed37 Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Wed, 30 Oct 2019 00:42:52 +0100 Subject: [PATCH] Fix #365 --- jupytext/cell_reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupytext/cell_reader.py b/jupytext/cell_reader.py index 307a96676..b8154ae7c 100644 --- a/jupytext/cell_reader.py +++ b/jupytext/cell_reader.py @@ -262,7 +262,7 @@ def extract_content(self, lines): class MarkdownCellReader(BaseCellReader): """Read notebook cells from Markdown documents""" comment = '' - start_code_re = re.compile(r"^```({})(.*)".format('|'.join( + start_code_re = re.compile(r"^```({})($|\s(.*)$)".format('|'.join( _JUPYTER_LANGUAGES.union({str.upper(lang) for lang in _JUPYTER_LANGUAGES})).replace('+', '\\+'))) non_jupyter_code_re = re.compile(r"^```") end_code_re = re.compile(r"^```\s*$")