File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/myst-cli/src/transforms Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -254,12 +254,15 @@ export function reduceOutputs(
254254 const outputsNodes = selectAll ( 'outputs' , mdast ) as GenericNode [ ] ;
255255 const cache = castSession ( session ) ;
256256 outputsNodes . forEach ( ( outputsNode ) => {
257- const outputs = outputsNode . children as GenericNode [ ] ;
257+ // Hidden nodes should not show up in simplified outputs for static export
258+ if ( outputsNode . visibility === 'remove' || outputsNode . visibility === 'hide' ) {
259+ outputsNode . type = '__delete__' ;
260+ return ;
261+ }
258262
263+ const outputs = outputsNode . children as GenericNode [ ] ;
259264 outputs . forEach ( ( outputNode ) => {
260- if ( outputNode . visibility === 'remove' || outputNode . visibility === 'hide' ) {
261- // Hidden nodes should not show up in simplified outputs for static export
262- outputNode . type = '__delete__' ;
265+ if ( outputNode . type !== 'output' ) {
263266 return ;
264267 }
265268 // Lift the `output` node into `Outputs`
You can’t perform that action at this time.
0 commit comments