Skip to content

Commit 2e8e90a

Browse files
committed
Use showLineNumbers instead of numbered
Former-commit-id: 817ee12
1 parent 9f6c715 commit 2e8e90a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/blocks/code.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import styles from "./code.module.css";
1616
// Initialize the cache for imported languages.
1717
const languageImports = new Map();
1818

19-
const Code = ({ code, children, language, img, lines, numbered }) => {
19+
const Code = ({ code, children, language, img, lines, showLineNumbers }) => {
2020
// Create a ref for the code element.
2121
const codeRef = useRef(null);
2222

@@ -64,7 +64,7 @@ const Code = ({ code, children, language, img, lines, numbered }) => {
6464
let customCode = code !== undefined ? code : children;
6565
let languageClass = `language-${language}`;
6666
const lineNumbersClass = classNames({
67-
"line-numbers": children?.props?.numbered || numbered,
67+
"line-numbers": children?.props?.showLineNumbers || showLineNumbers,
6868
});
6969

7070
if (children !== undefined && children.props !== undefined) {

content/kb/tutorials/chat.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ For an overview of the API, check out this video tutorial by Chanin Nantasenamat
4747

4848
Here's an minimal example of how to use `st.chat_message` to display a welcome message:
4949

50-
```python numbered
50+
```python showLineNumbers
5151
import streamlit as st
5252

5353
with st.chat_message("user"):
@@ -59,7 +59,7 @@ with st.chat_message("user"):
5959

6060
Notice the message is displayed with a default avatar and styling since we passed in `"user"` as the author name. You can also pass in `"assistant"` as the author name to use a different default avatar and styling, or pass in a custom name and avatar. See the [API reference](/library/api-reference/chat/st.chat_message) for more details.
6161

62-
```python numbered
62+
```python showLineNumbers
6363
import streamlit as st
6464
import numpy as np
6565

0 commit comments

Comments
 (0)