Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

feat(twoslash)!: improve rich renderer #41

Merged
merged 10 commits into from
Dec 14, 2023
Merged

Conversation

antfu
Copy link
Owner

@antfu antfu commented Dec 13, 2023

Breaking changes:

  • rendererRich and rendererClassic are now factory functions
  • Instead of creating a meta-line for popover queries and completions, this PR moves them to the inside of the token, so the positions are relative to the token.
  • Some DOM structures changed. If don't need to worry about it if you are using shikiji-twoslash/style-rich.css, otherwise you might need to adopt your CSS.
image image

Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (7987565) 96.11% compared to head (84ceee5) 96.95%.

Files Patch % Lines
packages/shikiji-twoslash/src/renderer-rich.ts 99.01% 2 Missing ⚠️
packages/shikiji-twoslash/src/renderer-classic.ts 99.41% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
+ Coverage   96.11%   96.95%   +0.83%     
==========================================
  Files          39       40       +1     
  Lines        3399     3509     +110     
  Branches      453      470      +17     
==========================================
+ Hits         3267     3402     +135     
+ Misses        132      107      -25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@antfu antfu changed the title feat(twoslash): improve rich renderer feat(twoslash)!: improve rich renderer Dec 14, 2023
@antfu antfu merged commit 0bd42a8 into main Dec 14, 2023
@antfu antfu deleted the feat/twoslash-rich-structure branch December 14, 2023 18:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant