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
Inconsistent view of unordered list (markdown + expander) #4111
Comments
@shashankdeshpande, as far as I understood, it's not a bug. The thing is, you used two TABS in the markdown list, so the parser interprets them as nested elements of a list. Just remove one tab, and it should work: import streamlit as st
with st.expander('Expand this', expanded=True):
st.markdown('''
List of items
- item 1
- item 2
- item 3
''') |
@antonace Thanks for suggestion! Tried removing tab but it's not working. I guess this is a bug as we are not getting same view for same markdown text. Code snippet: import streamlit as st
default_val = '''
List of items
- item 1
- item 2
- item 3
'''
markdown_text = st.text_area('Enter markdown text', value=default_val)
col1, col2 = st.columns(2)
col1.markdown(markdown_text)
with col2.expander('Expand this', expanded=True):
st.markdown(markdown_text) Output: |
Marking this as bug again. The example above actually doesn't work correctly, even though it should. Seems to be conncected to the expander. |
Did some initial investigation, but it looks like the bug is a result of the fact that the expander is considered a |
Summary
Inconsistent view of unordered list, difference in bullet points as follows -
Markdown inside expander
Code snippet:
Output:
Markdown
Code snippet:
Output:
The text was updated successfully, but these errors were encountered: