File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
content/develop/concepts/configuration Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ const Code = ({
6161 lines,
6262 hideCopyButton = false ,
6363 filename,
64+ filenameOnly = true ,
6465} ) => {
6566 // Create a ref for the code element.
6667 const codeRef = useRef ( null ) ;
@@ -125,7 +126,8 @@ const Code = ({
125126 // Extract language identifier for display
126127 const langId = languageClass ?. substring ( 9 ) || language || "python" ;
127128 const displayLanguage = languageDisplayNames [ langId ] || langId ;
128- const showLanguage = langId . toLowerCase ( ) !== "none" ;
129+ const showLanguage =
130+ langId . toLowerCase ( ) !== "none" && ! ( filenameOnly && filename ) ;
129131
130132 const Header = (
131133 < div className = { classNames ( styles . Header , "code-block-header" ) } >
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ codeFont="noto-mono"
131131
132132Directory structure:
133133
134- <Code language =" none " filename =" directory structure" >
134+ <Code language =" none " filename =" Directory structure" >
135135
136136project_directory/
137137├── .streamlit/
You can’t perform that action at this time.
0 commit comments