fix(ansi): pre hightlighting issue if line spans are missing - #384
Open
farnabaz wants to merge 1 commit into
Open
fix(ansi): pre hightlighting issue if line spans are missing#384farnabaz wants to merge 1 commit into
farnabaz wants to merge 1 commit into
Conversation
Handle highlighted code where tokens are direct children of code instead of nested under span.line, and accept 3-digit hex colors.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
comark
@comark/angular
@comark/ansi
@comark/html
@comark/nuxt
@comark/react
@comark/svelte
@comark/vue
commit: |
Contributor
📦 Bundle size snapshot is out of dateThe published size of one or more packages changed, so the inline snapshot in Please review the diff below. If the change is expected, accept the new snapshot:
Only maintainers with write access can trigger the update. You can also comment Bundle size diff FAIL test/bundle.test.ts > package bundle size > published size of each package
Error: Snapshot `package bundle size > published size of each package 1` mismatched
- Expected
+ Received
@@ -1,8 +1,8 @@
{
"@comark/angular": "54.3k (70 files)",
- "@comark/ansi": "39.9k (98 files)",
+ "@comark/ansi": "40.3k (98 files)",
"@comark/html": "18.6k (58 files)",
"@comark/nuxt": "11.8k (58 files)",
"@comark/react": "43.6k (74 files)",
"@comark/svelte": "43.9k (82 files)",
"@comark/vue": "60.5k (78 files)",
❯ test/bundle.test.ts:61:20
59| }
60|
61| expect(report).toMatchInlineSnapshot(`
| ^
62| {
63| "@comark/angular": "54.3k (70 files)",
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prehighlighting when Shiki (or similar) emits token spans directly undercodewithoutspan.linewrappers--shiki-dark/colorstylesTest plan
@comark/ansiwhere tokens lackspan.linewrappersspan.linewrappers are present#abc) convert correctly to ANSI truecolor