-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
docs: improve docs for transformers #617
docs: improve docs for transformers #617
Conversation
✅ Deploy Preview for shiki-next ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for shiki-matsu ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #617 +/- ##
=======================================
Coverage 96.17% 96.17%
=======================================
Files 70 70
Lines 5698 5698
Branches 751 751
=======================================
Hits 5480 5480
Misses 212 212
Partials 6 6 ☔ View full report in Codecov by Sentry. |
console.log('hewwo') // [\!code --] | ||
console.log('hello') // [\!code ++] | ||
} | ||
console.log('hewwo') // [\!code --] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to keep the function wrapper to showcase that some lines can be un-highlighted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added an extra console.log('good bye')
to show some unhighlighted code
console.error('Error') // [\!code error] | ||
console.warn('Warning') // [\!code warning] | ||
} | ||
console.error('Error') // [\!code error] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added console.log('No errors or warnings')
to show a line without errors or warnings.
Co-authored-by: Anthony Fu <github@antfu.me>
Co-authored-by: Anthony Fu <github@antfu.me>
Co-authored-by: Anthony Fu <github@antfu.me>
Description
👋, I've been working a lot with transformers recently as part of my day job.
I've made some edits to
@shikijs/transformers
the documentation which would have helped me understand them better without reading the source code.I've been pretty aggressive with my rewrite -no problem fine if you decide to only take some of the parts / ideas (or none of it at all!) 👍
Some of the ideas in this rewrite:
:3
range explanationsIdeas to make this page even better (but I stopped short of these):
transformerNotationDiff
-> Diff. Many of the names are cut off on the rightLinked Issues
Additional context