diff --git a/markdown_it/port.yaml b/markdown_it/port.yaml index d5d9b40e..499b7e38 100644 --- a/markdown_it/port.yaml +++ b/markdown_it/port.yaml @@ -1,7 +1,7 @@ - package: markdown-it/markdown-it version: 12.1.0 - commit: 13cdeb95abccc78a5ce17acf9f6e8cf5b9ce713b - date: Jul 1, 2021 + commit: e5986bb7cca20ac95dc81e4741c08949bf01bb77 + date: Jul 15, 2021 notes: - Rename variables that use python built-in names, e.g. - `max` -> `maximum` diff --git a/markdown_it/rules_block/code.py b/markdown_it/rules_block/code.py index ed8ad24e..6d9c87a3 100644 --- a/markdown_it/rules_block/code.py +++ b/markdown_it/rules_block/code.py @@ -29,7 +29,7 @@ def code(state: StateBlock, startLine: int, endLine: int, silent: bool = False): state.line = last token = state.push("code_block", "code", 0) - token.content = state.getLines(startLine, last, 4 + state.blkIndent, True) + token.content = state.getLines(startLine, last, 4 + state.blkIndent, False) + "\n" token.map = [startLine, state.line] return True diff --git a/tests/test_port/test_no_end_newline.py b/tests/test_port/test_no_end_newline.py index 42478dfe..b35423e1 100644 --- a/tests/test_port/test_no_end_newline.py +++ b/tests/test_port/test_no_end_newline.py @@ -17,6 +17,7 @@ ("

", "

"), ("p", "

p

\n"), ("[reference]: /url", ""), + (" indented code block", "
indented code block\n
\n"), ], ) def test_no_end_newline(input, expected):