Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Fix project cross-references in typst #1742

Merged
merged 1 commit into from
Jan 9, 2025
Merged

🔧 Fix project cross-references in typst #1742

merged 1 commit into from
Jan 9, 2025

Conversation

fwkoch
Copy link
Collaborator

@fwkoch fwkoch commented Jan 9, 2025

This prevents cross-references to other pages in typst from being written as (invalid) links. They now remain as (correct) cross-references.

(This is a small part of the changes originally in #1701)

Copy link

changeset-bot bot commented Jan 9, 2025

🦋 Changeset detected

Latest commit: 1c8a832

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
myst-to-typst Patch
myst-cli Patch
mystmd Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -363,10 +363,10 @@ const handlers: Record<string, Handler> = {
legend: captionHandler,
captionNumber: () => undefined,
crossReference(node: CrossReference, state, parent) {
if (node.remote) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xrefs to other pages are still considered remote - we only want to do this if there is a remoteBaseUrl, i.e. they are xrefs to a totally separate project.

@rowanc1 rowanc1 merged commit 2c8fa97 into main Jan 9, 2025
7 checks passed
@rowanc1 rowanc1 deleted the typst/xrefs branch January 9, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants