-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Markdown nested lists deeper than two levels don't get indented. #4009
Comments
I just want to add, although I referenced this issue in #3122, that was due to a misunderstanding on my part and I don't believe the issues are related (the other one was not to do with Markdown). |
I can confirm the nesting issue in Gitea |
Thanks. So, you are suggesting it must be 4 spaces in 'Gitea-flavoured' markdown? Usually nesting needs only 2 spaces, I thought. |
The underlying markdown implementation of gitea is https://github.com/sparksuite/simplemde-markdown-editor the interesting thing is, that the demo on https://simplemde.com/ works with both, 2 or 4 indents.
So when I prepares a list with tabs for indention, it is treated as 4 spaces in the browser which works correctly. My suggestion is to use always 4 spaces for indention. |
@markuman Thanks for adding the animated GIF; it makes it a lot clearer than my initial post! It's bit of a shame because a lot of third-party markdown uses 2 spaces, so even though I can make sure I use 4 spaces from here on, things will still be a bit screwed up for other people's work. If Gitea could use either, that would be great. At least using 4 spaces seems to behave in other flavours where the standard is 2 (from my very quick, uncomprehensive test). |
@markuman Gitea uses russross/blackfriday for markdown rendering. |
@yasuokav but https://try.gitea.io/vendor/librejs.html is listing https://simplemde.com/ and I thought, the JS library does the frontend rendering? |
@markuman I think it's just used for the wiki page editor. |
Marked as blocked by upstream library missing such functionality |
This may duplicated with #3122 |
This is fixed with new markdown library |
[x]
):Description
Lists can normally be nested in Markdown, by using two (2) spaces to indent per level of nesting.
Today, I committed some markdown that uses multiple levels of nesting and it does not behave as expected. Every second level of nesting does not show as being nested.
For example, the following markdown, using indenting of 2 spaces per nested level, should display 8 levels of nesting, but it actually only shows 4:
However, it is possible to force the nesting to display properly by using additional spaces (3 spaces instead of 2) per nested level, on the second level onwards. This is not normal behaviour in other markdown implementations.
I see this incorrect behaviour in both markdown files, and the Wiki. For a test page on try.gitea.io, see here.
The text was updated successfully, but these errors were encountered: