File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -1555,20 +1555,22 @@ async function mdFromCodeCell(
15551555
15561556 for ( const { index, output } of sortedOutputs ) {
15571557 // compute output label
1558- const outputLabel = label &&
1558+ let outputLabel_tmp = label ;
1559+ if ( label &&
15591560 (
15601561 labelCellContainer ||
15611562 ( Array . isArray ( sortedOutputs ) && ( sortedOutputs . length > 1 ) )
15621563 ) &&
1563- isDisplayData ( output )
1564- ? ( label + "-" + nextOutputSuffix ++ )
1565- : label ;
1566- // If the user specifies a top-level array for images but also labels give a warning.
1567- if ( labelCellContainer === false &&
1568- ( Array . isArray ( sortedOutputs ) == true && ( sortedOutputs . length > 1 ) )
1569- ) {
1570- warning ( "Warning: using multiple top-level figures with labels might result in unwanted behaviour." )
1564+ isDisplayData ( output ) ) {
1565+ outputLabel_tmp = label + "-" + nextOutputSuffix ++ ;
1566+ // If the user specifies a top-level array for images but also labels give a warning.
1567+ if ( labelCellContainer === false &&
1568+ ( Array . isArray ( sortedOutputs ) == true && ( sortedOutputs . length > 1 ) )
1569+ ) {
1570+ warning ( "Warning: using multiple top-level figures with labels might result in unwanted behaviour: " + label )
1571+ }
15711572 }
1573+ const outputLabel = outputLabel_tmp
15721574 // If this output has been marked to not be displayed
15731575 // just continue
15741576 if ( output . metadata ?. [ kQuartoOutputDisplay ] === false ) {
You can’t perform that action at this time.
0 commit comments