Skip to content

Commit

Permalink
🏷️ Do not write implicit labels for markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed Jan 6, 2025
1 parent 6f6032b commit 59f3bf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/young-moles-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"myst-to-md": patch
---

do not write out implicit references for titles
2 changes: 1 addition & 1 deletion packages/myst-to-md/src/references.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function labelWrapper(handler: Handle) {
return (node: any, _: Parent, state: NestedState, info: Info): string => {
const ident = node.identifier ?? node.label;
const prefix = ident ? `(${ident})=\n` : '';
return `${prefix}${handler(node, _, state, info)}`;
return `${node.implicit ? '' : prefix}${handler(node, _, state, info)}`;
};
}

Expand Down

0 comments on commit 59f3bf8

Please sign in to comment.