Nested list with st.markdown
See original GitHub issueHi,
As unbelievable as it is, I couldn’t create a nested list using st.markdown
. Here is the most basic I tried:
- A
- a
- B
which should yield:
- A
- a
- B
, but instead gives a flat list. Neither one space, nor two spaces, tab key, or \t
worked. A minimal working example is highly appreciated.
Many thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Markdown Tutorial - Nested Lists - CommonMark
To nest one list within another, indent each item in the sublist by four spaces. You can also nest other elements like paragraphs,...
Read more >Developers - Nested list with st.markdown - - Bountysource
Hi, As unbelievable as it is, I couldn't create a nested list using st.markdown . Here is the most basic I tried:
Read more >How to markdown nested list items in Bitbucket?
I'm trying to see my markdown nested list items rendered with corresponding indentation when viewed in a browser live from the Bitbucket ...
Read more >How to write nested numbered lists - Meta Stack Exchange
@Arjan Well, Markdown supports nested lists, but I don't think it supports a way to change their type; the only type you can...
Read more >How To Do Nested List In Markdown? – What Is Mark Down
To create a nested list in markdown, you will need to use a combination of list items and sub-list items. List items are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I get it now. So this works:
, but this doesn’t:
It means one cannot dynamically/programmatically create lists (not easily at least). One solution is to generate the string dynamically and then write it at once. The other way is to use unsafe HTML.
Many thanks Best
Many thanks. I totally agree that there is room for improvement here.
For now, I solved my problem by generating a string dynamically and then feeding it to
st.markdown
at once.