-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
feature:st.codeRelated to the `st.code` elementRelated to the `st.code` elementpriority:P4Low priorityLow prioritystatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected
Description
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
If wrap_lines=True is set in st.code, it only wraps on whitespace. That means long strings without a whitespace won't wrap.
Reproducible Code Example
import streamlit as st
long_string = "askldfjlweklrjweifjlsdfliwjlierjilsildfjlslfijwilerijlesijlrlijsdflijslijerilweilrilsdfilsilfijlsdf"
st.code(long_string, wrap_lines=True)Steps To Reproduce
Run this app, or see playground.
Expected Behavior
Wraps.
Current Behavior
Doesn't wrap.
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: 1.43
- Python version:
- Operating System:
- Browser:
Additional Information
No response
github-actions and yyoon
Metadata
Metadata
Assignees
Labels
feature:st.codeRelated to the `st.code` elementRelated to the `st.code` elementpriority:P4Low priorityLow prioritystatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected