From ef81a829270653fac7cc8baea8d06513a422904e Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Fri, 2 Jun 2023 13:37:50 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20tab=20preventing=20paragr?= =?UTF-8?q?aph=20continuation=20in=20lists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements upstream: https://github.com/markdown-it/markdown-it/commit/1cd8a5143b22967a7583bba19678900efdf72adf --- markdown_it/port.yaml | 6 +++--- markdown_it/rules_block/list.py | 2 +- tests/test_port/fixtures/commonmark_extras.md | 21 +++++++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/markdown_it/port.yaml b/markdown_it/port.yaml index 679d13b7..c0a4d70b 100644 --- a/markdown_it/port.yaml +++ b/markdown_it/port.yaml @@ -1,7 +1,7 @@ - package: markdown-it/markdown-it - version: 12.3.0 - commit: 2e31d3430187d2eee1ba120c954783eebb93b4e8 - date: Dec 9, 2021 + version: 12.3.1 + commit: 76469e83dc1a1e3ed943b483b554003a666bddf7 + date: Jan 7, 2022 notes: - Rename variables that use python built-in names, e.g. - `max` -> `maximum` diff --git a/markdown_it/rules_block/list.py b/markdown_it/rules_block/list.py index a5c596bb..d8070d74 100644 --- a/markdown_it/rules_block/list.py +++ b/markdown_it/rules_block/list.py @@ -130,7 +130,7 @@ def list_block(state: StateBlock, startLine: int, endLine: int, silent: bool) -> if ( silent and state.parentType == "paragraph" - and state.tShift[startLine] >= state.blkIndent + and state.sCount[startLine] >= state.blkIndent ): isTerminatingParagraph = True diff --git a/tests/test_port/fixtures/commonmark_extras.md b/tests/test_port/fixtures/commonmark_extras.md index 168b039d..5d13d859 100644 --- a/tests/test_port/fixtures/commonmark_extras.md +++ b/tests/test_port/fixtures/commonmark_extras.md @@ -166,6 +166,27 @@ Regression test (code block + regular paragraph) . +Regression test (tabs in lists, #830) +. +1. asd + 2. asd + +--- + +1. asd + 2. asd +. +
    +
  1. asd +2. asd
  2. +
+
+
    +
  1. asd +2. asd
  2. +
+. + Blockquotes inside indented lists should terminate correctly . - a