File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1555,11 +1555,18 @@ async function mdFromCodeCell(
15551555
15561556 for ( const { index, output } of sortedOutputs ) {
15571557 // compute output label
1558- const outputLabel = label && ( labelCellContainer || Array . isArray ( sortedOutputs ) ) && isDisplayData ( output )
1558+ const outputLabel = label &&
1559+ (
1560+ labelCellContainer ||
1561+ ( Array . isArray ( sortedOutputs ) && ( sortedOutputs . length > 1 ) )
1562+ ) &&
1563+ isDisplayData ( output )
15591564 ? ( label + "-" + nextOutputSuffix ++ )
15601565 : label ;
15611566 // If the user specifies a top-level array for images but also labels give a warning.
1562- if ( labelCellContainer === false && Array . isArray ( sortedOutputs ) == true ) {
1567+ if ( labelCellContainer === false &&
1568+ ( Array . isArray ( sortedOutputs ) == true && ( sortedOutputs . length > 1 ) )
1569+ ) {
15631570 warning ( "Warning: using multiple top-level figures with labels might result in unwanted behaviour." )
15641571 }
15651572 // If this output has been marked to not be displayed
You can’t perform that action at this time.
0 commit comments