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

st.button label empty if text is 'number." or starts with 'number.space" #6054

Closed
3 of 5 tasks
muxxxxxxx opened this issue Feb 2, 2023 · 1 comment · Fixed by #6163
Closed
3 of 5 tasks

st.button label empty if text is 'number." or starts with 'number.space" #6054

muxxxxxxx opened this issue Feb 2, 2023 · 1 comment · Fixed by #6163
Assignees
Labels

Comments

@muxxxxxxx
Copy link

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

Label doesn't show if it starts with a number and is followed by a dot.
Also fails if followed by a space and additional text

Reproducible Code Example

import streamlit as st

if st.button('1.'):   #no label shown
    st.write('test 1')

if st.button('123. test'): #no label shown
    st.write('test 2')

if st.button('123.test'): #as expected
    st.write('test 3')

Steps To Reproduce

  1. Just run the example

Expected Behavior

Labels should be shown

Current Behavior

No response

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.17
  • Python version: 3.09
  • Operating System: Win 11
  • Browser: Firefox 109 / latest Edge
  • Virtual environment: no
    Screenshot 2023-02-02 191918

Additional Information

No response

Are you willing to submit a PR?

  • Yes, I am willing to submit a PR!
@muxxxxxxx muxxxxxxx added status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working labels Feb 2, 2023
@kajarenc kajarenc added priority:P3 and removed status:needs-triage Has not been triaged by the Streamlit team labels Feb 3, 2023
@kajarenc
Copy link
Collaborator

kajarenc commented Feb 3, 2023

Hello @muxxxxxxx, and thank you for reporting this issue!

We added support for Markdown in widget labels, and in this case, we have a collision that number with followed dot interpreted as a markdown list element (we don't support lists in widget labels.

Unsupported elements are not displayed. Display unsupported elements as literal characters by backslash-escaping them. E.g. 1\. Not an ordered list.

This clarification has already been added in docs and will be available during the next release!

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

Successfully merging a pull request may close this issue.

3 participants