Skip to content

Nested List Formatting Issue #84

Closed
@Techman

Description

@Techman

Hello,

I am currently experimenting with this library for parsing HTML blog post content from an RSS feed for use on Reddit. While this library does not claim to cover Reddit's version of Markdown, it is overall fairly compatible with a few overrides here and there depending on the desired behavior.

However, an issue I have been running into has to deal with nested lists, particularly unordered lists (but this may apply to ordered lists too). In the Markdown output, nested unordered lists are not being indented properly.

For example, a section toward the bottom of this article is rendered as such in the output, with no indentation:

#### Lost Sector - Master

* Old
+ Small chance of up to two Enhancement Cores.

* New
+ **Two Enhancement Cores** and a **medium chance** at one more.
+ **One Enhancement Prism** and a **medium chance** at one more.

If one indents the lists (the convention I use is 4 spaces), it begins to show properly on Reddit.

#### Lost Sector - Master

* Old
    + Small chance of up to two Enhancement Cores.

* New
    + **Two Enhancement Cores** and a **medium chance** at one more.
    + **One Enhancement Prism** and a **medium chance** at one more.

I wrote a small demonstration/test script that I hope is helpful in reproducing. Requires FeedParser, Beautiful Soup, LXML, and Markdownify 0.11.6.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions