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

[Feat]: Add code processing to annotations #19

Merged
merged 3 commits into from
Nov 18, 2024
Merged

Conversation

Adammatthiesen
Copy link
Member

This pull request introduces significant changes to the twoslash package, focusing on integrating Expressive Code for better code block rendering and simplifying the handling of annotations. The most important changes include the addition of Expressive Code dependencies, refactoring of annotation classes, and updates to helper functions to support the new rendering system.

Integration of Expressive Code:

Refactoring of Annotation Classes:

Updates to Helper Functions:

  • packages/twoslash/src/helpers.ts: Added new functions renderMarkdownWithCodeBlocks, renderMDInline, renderJSDocs, and renderType to handle markdown processing and rendering with Expressive Code. [1] [2]

Code Cleanup:

  • packages/twoslash/src/annotations/hover.ts and packages/twoslash/src/annotations/static.ts: Removed redundant helper imports and functions. [1] [2]

Styling Updates:

Copy link

changeset-bot bot commented Nov 18, 2024

🦋 Changeset detected

Latest commit: 2cdad62

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

This PR includes changesets to release 1 package
Name Type
expressive-code-twoslash 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

Copy link
Contributor

Thank you for submitting your Pull Request, the following links will become available for preview shortly:

Copy link

pkg-pr-new bot commented Nov 18, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/expressive-code-twoslash@19

commit: 2cdad62

@Adammatthiesen Adammatthiesen merged commit 31a47d3 into main Nov 18, 2024
4 checks passed
@Adammatthiesen Adammatthiesen deleted the experimental branch November 18, 2024 09:22
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.

1 participant