st.code
ignores language argument if set to 'diff'
#8687
Labels
feature:st.code
priority:P3
status:confirmed
Bug has been confirmed by the Streamlit team
type:bug
Something isn't working
Checklist
Summary
st.code
should highlight the text from argumentbody
based on what's specified by argumentlanguage
. According to the documentation, the list of available languages are specified by this list (react-syntax-highlighter). However,language='diff'
does not work on my end even if it appears in the aforementioned list.Reproducible Code Example
Steps To Reproduce
Expected Behavior
The code should be highlighted. Lines starting with
+
should probably be green, and lines starting with-
should be red.Current Behavior
No syntax highlight happens, even if the language
diff
is listed in react-syntax-highlighter's list.I am unsure if this affects other languages, but maybe does. If so, the list of languages should be edited to show the actual list of languages supported.
Is this a regression?
Debug info
Additional Information
(maybe related: #5028)
The text was updated successfully, but these errors were encountered: