Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fix nested list #179

Open
wants to merge 3 commits into
base: 3.20.x
Choose a base branch
from

Conversation

itsdonnix
Copy link

Q A
Documentation yes
Bugfix no
BC Break no
New Feature no
RFC no
QA no

Description

Fix nested lists

Signed-off-by: Don Alfons <donnisnoni@outlook.com>
@Xerkus
Copy link
Member

Xerkus commented Mar 7, 2024

Lists are already valid and correctly formatted with 2 spaces indentation.

Markdown spec allows up to 3 extra leading spaces that are ignored and stripped. We, however, do not allow them for uniformity.

@froschdesign
Copy link
Member

froschdesign commented Mar 7, 2024

@Xerkus
But for some reason, MkDocs only works with 4 spaces.

Some background: Python-Markdown/markdown#3

@Xerkus
Copy link
Member

Xerkus commented Mar 7, 2024

@froschdesign I found mkdocs/mkdocs#2719 (comment)

looks like I added mdx_truly_sane_lists into the markdown extension and that changed the indent to 2 spaces instead of 4.

Can it be fixed in our docs builder with that?

@froschdesign
Copy link
Member

@Xerkus
I'm already searching for it…

@Xerkus
Copy link
Member

Xerkus commented Mar 7, 2024

@froschdesign reading your link, I understand mkdocs is not using commonmark?

@froschdesign
Copy link
Member

MkDocs uses Python-Markdown:

Indentation/Tab Length

The syntax rules clearly state that when a list item consists of multiple paragraphs, “each subsequent paragraph in a list item must be indented by either 4 spaces or one tab” (emphasis added). However, many implementations do not enforce this rule and allow less than 4 spaces of indentation. The implementers of Python-Markdown consider it a bug to not enforce this rule.

This applies to any block level elements nested in a list, including paragraphs, sub-lists, blockquotes, code blocks, etc. They must always be indented by at least four spaces (or one tab) for each level of nesting.

https://python-markdown.github.io/#differences

@Xerkus
Copy link
Member

Xerkus commented Mar 7, 2024

Can't be merged until linter is updated to allow/require 4 space indentation for nested lists as otherwise it will cause CI failures everywhere.

@Xerkus
Copy link
Member

Xerkus commented Mar 8, 2024

@itsdonnix markdown lint was updated. Can you please also fix remaining nested lists?

Signed-off-by: Don Alfons <donnisnoni@outlook.com>
@itsdonnix
Copy link
Author

@itsdonnix markdown lint was updated. Can you please also fix remaining nested lists?

Sure @Xerkus ! I forgot to indenting the v1 application section and the readme.

@itsdonnix
Copy link
Author

I think the CI only checks for the readme file

Signed-off-by: Don Alfons <donnisnoni@outlook.com>
@Xerkus Xerkus requested a review from froschdesign March 9, 2024 12:37
@Xerkus
Copy link
Member

Xerkus commented Mar 9, 2024

@itsdonnix Thank you. I was totally unaware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants