trentm / trentm/python-markdown2

Code block breaks list recognition

Open
#124 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.8k
Forks
459
Avg merge
2d 19h
Merged PRs (30d)
4

Description

I have a case where an indented code block results in list (bullet) parsing being broken. Here's a markdown file shared in Dropbox. Dropbox apparently uses python-markdown2, and displays the exact error I see locally.

https://www.dropbox.com/s/htl8ibycyhhyrpg/notes2.md

To be clear, the point is that the bullets towards the end of the file are not recognized correctly, with the peculiar exception of the last one. You can make changes to the code block near the start of the file - add or remove lines, or change its indentation - and you'll see differences in the way the bullets are handled.

I've double-checked the behavior with Python Markdown (version 2.3.1) as well as with the standard Markdown.pl, and both parse the test file correctly and recognize all the bullets.

Incidentally, the GitHub markdown used on this web page also understands the file correctly. I'm pasting it again below. Compare the bullet rendering below to that exhibited by the Dropbox shared version.


Module 3: Layout

This is a test

  • Note I'm calling this block "Layout" right now...
    • Create a main form with the following structure.

      <dxb:BarManager >
          <dxb:BarManager.Items>
              <dxb:BarSubItem x:Name="barSubItem1" Content="File">
              </dxb:BarSubItem>
              <dxb:BarButtonItem x:Name="quitItem" Content="Quit"/>
              <dxb:BarSubItem x:Name="barSubItem2" Content="Help"/>
          </dxb:BarManager.Items>
      </dxb:BarManager>
      
  • Windows UI?

Hereafter: Specific Controls

placeholder

Grid and Editors

placeholder

Scheduler

placeholder

Data Analysis

placeholder

  • Gauges
  • Charts
  • Pivot Grid
Document Export and Reporting
  • Printing System (XtraPrinting)
  • XtraReports

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the pasted Markdown, or the linked notes2.md file, and inspect how the indented XML code block affects the following bullet list. Done means the bullets after the code block are recognized consistently, including the final list item, without changing the behavior of valid code blocks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.