Skip to content

Commit

Permalink
👈 Allow for prefix and suffix in citations (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 authored Feb 12, 2024
1 parent 21d6dce commit b7cbb59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-oranges-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'myst-to-react': patch
---

Prefix and suffix in citations
2 changes: 2 additions & 0 deletions packages/myst-to-react/src/crossReference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ export const CrossReferenceNode: NodeRenderer<CrossReference> = ({ node }) => {
url={url}
dataUrl={dataUrl}
>
{node.prefix && <>{node.prefix} </>}
<MyST ast={node.children} />
{node.suffix || null}
</CrossReferenceHover>
);
};
Expand Down

0 comments on commit b7cbb59

Please sign in to comment.