Skip to content

Add warning for callouts with invalid ID prefixes instead of failing completely with bad errors - #13592

Merged
cderv merged 3 commits into
mainfrom
typst/callout-id-error
Oct 23, 2025
Merged

cderv merged 3 commits into
mainfrom
typst/callout-id-error

Conversation

@cderv

@cderv cderv commented Oct 21, 2025

Copy link
Copy Markdown
Member

closes #13589

Previously we would have a really bad error when a random id was used

::: {#random-id .callout-note}

## Note

Content

:::

This is not expected but could happen. We should not fail badly on lua, but gracefully handle it.

I choose to

  • Warn about unexpected id being used
  • Fallback to a usuall callout ignoring ID and crossreference.

@posit-snyk-bot

posit-snyk-bot commented Oct 21, 2025 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
✅ Licenses 0 0 0 0 0 issues
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
cderv force-pushed the typst/callout-id-error branch from c08e454 to 5aa9e94 Compare October 23, 2025 13:11
@cderv
cderv merged commit 20c2761 into main Oct 23, 2025
51 checks passed
@cderv
cderv deleted the typst/callout-id-error branch October 23, 2025 13:56
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.

Better error when unknown id is used on callout in typst

2 participants