matthewwithanm / matthewwithanm/python-markdownify

Missing new lines between adjacent lists

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

Nobody has claimed this yet.

Dominant language
Python
Stars
2.2k
Forks
203
PR merge metrics
No merged PRs in 30d

Description

<ol><li>A</li><li>B</li></ol><ul><li>a</li><li>b</li></ul>

Should render to markdown as:

  1. A
  2. B
  • a
  • B

But no blank line is included between the two lists.

I subclassed the main class and removed the before_paragraph logic and always prefixed with 3 newlines and this fixed it for me.

It's a problem because the reverse transform can't find the two lists.

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

Reproduce the adjacent ordered/unordered list case described in the issue, then inspect the list conversion path and the mentioned before_paragraph logic. Confirm it is done when the HTML example converts with a blank line between the two Markdown lists and the reverse transform can distinguish them.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.