Skip to content

Commit 028f385

Browse files
agoose77fwkoch
authored andcommitted
fix: use outputs- for all prefixes
1 parent c7dfec1 commit 028f385

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/myst-transforms/src/blocks.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ describe('Test blockMetadataTransform', () => {
139139
},
140140
[
141141
u('outputs', { identifier: 'my_label-outputs' }, [
142-
u('output', { identifier: 'my_label-output-0' }, 'We know what we are'),
143-
u('output', { identifier: 'my_label-output-1' }, 'but know not what we may be.'),
142+
u('output', { identifier: 'my_label-outputs-0' }, 'We know what we are'),
143+
u('output', { identifier: 'my_label-outputs-1' }, 'but know not what we may be.'),
144144
]),
145145
],
146146
),

packages/myst-transforms/src/blocks.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ export function blockMetadataTransform(mdast: GenericParent, file: VFile) {
9292
const outputs = selectAll('output', outputsNode) as GenericNode[];
9393
outputs.forEach((outputNode, index) => {
9494
if (outputNode && !outputNode.identifier) {
95-
outputNode.identifier = `${block.identifier}-output-${index}`;
95+
// Label output node
96+
outputNode.identifier = `${outputsNode.identifier}-${index}`;
9697
}
9798
});
9899
}

0 commit comments

Comments
 (0)