File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export interface MakeCodeBlocksRenderingProps {
1414 snippetMode ?: boolean ;
1515 layout ?: BlockLayout ;
1616 loaderCmp ?: React . ReactNode ;
17+ alt ?: string ;
1718}
1819
1920export interface MakeCodeBlocksRenderingState {
@@ -32,6 +33,7 @@ const MakeCodeBlocksRendering = ({
3233 layout,
3334 code,
3435 className,
36+ alt,
3537} : MakeCodeBlocksRenderingProps ) => {
3638 const [ state , setState ] = useState < MakeCodeBlocksRenderingState > ( {
3739 rendering : true ,
@@ -95,9 +97,10 @@ const MakeCodeBlocksRendering = ({
9597 < img
9698 className = "ui image"
9799 alt = {
98- code === undefined || typeof code === 'string'
100+ alt ??
101+ ( code === undefined || typeof code === 'string'
99102 ? code
100- : code . text ! [ 'main.ts' ]
103+ : code . text ! [ 'main.ts' ] )
101104 }
102105 src = { uri }
103106 width = { width }
You can’t perform that action at this time.
0 commit comments