Skip to content

Conversation

@Karibash
Copy link
Contributor

@Karibash Karibash commented Sep 1, 2025

Description

Fixes error handling in Twoslash packages to properly return cleaned code when errors occur, instead of ignoring the error handler's return value.

Linked Issues

close #1069

Additional context

@netlify
Copy link

netlify bot commented Sep 1, 2025

Deploy Preview for shiki-next ready!

Name Link
🔨 Latest commit 1442449
🔍 Latest deploy log https://app.netlify.com/projects/shiki-next/deploys/68b509bfada7b700088571d4
😎 Deploy Preview https://deploy-preview-1070--shiki-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Sep 1, 2025

Deploy Preview for shiki-matsu ready!

Name Link
🔨 Latest commit 1442449
🔍 Latest deploy log https://app.netlify.com/projects/shiki-matsu/deploys/68b509bfff540a00086cfc8e
😎 Deploy Preview https://deploy-preview-1070--shiki-matsu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu antfu changed the title fix: Improve Twoslash error handling fix(twoslash): fix onTwoslashError return value handling Sep 1, 2025
@antfu antfu merged commit e86b0a7 into shikijs:main Sep 1, 2025
12 checks passed
@Karibash Karibash deleted the bugfix/on-twoslash-error branch September 1, 2025 13:48
@avivkeller
Copy link

Hiya! Can this be released as a patch version? I'd love to do this feature to pass some server-side errors to the client (for debugging)

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.

onTwoslashError returning string is ignored instead of replacing the code

3 participants