Comments (2)
Good to know, Glow - thanks for introducing it!
First, to your desired features:
Highlight separate tokens (usually words)
You could, Shiki has a very powerful transformer API - for example: https://shiki.style/packages/transformers#transformernotationwordhighlight
Highlight errors
You could do it as well. Probably much more powerful than Glow as far as I see:
- https://twitter.com/antfu7/status/1754538968421417219
- https://twitter.com/antfu7/status/1745875530275070054
- https://sli.dev/guide/syntax#twoslash-integration
While tbh, they both has certain complexity to set up, it would be actually an integration issue about how we could find a easy way to configure and animate with the clicks system etc. But I also see there shouldn't be any blocker preventing you from doing it on the userland today as Slidev exposes the transformer configs: https://sli.dev/custom/highlighters#configure-shiki (just might not be very easy)
About Glow - while at first glance it seems to be a good idea, after digging in - it doesn't seem to be a very solid solution (https://github.com/nuejs/nue/blob/master/packages/glow/src/glow.js) - it's a hard-coded regex-based solution. This provides rather a rough highlighting result, which to me, fall into the similar category as Prism.js. But as it seems to be more lightweight and modern than Prism, I don't mind to actually support it as long as the integration and maintenance do not take too much effort. But as this is still an integration problem, I don't think word and errors highlight would just work especially if you want to have some animations around them or so.
from slidev.
@antfu thanks a lot for the meaningful answer! I have to agree with your points, it seems this feature should be closed/deprioritized and another one, for "more interesting" highlights, should be created. On it.
from slidev.
Related Issues (20)
- Change path for layouts, components and etc. HOT 1
- When a slide don't fit on one page create a new page automaticly HOT 1
- Add a quizz components
- markdown-it plugins running twice? HOT 2
- TwoSlash Tooltip shown at wrong position
- Feature: Export to PowerPoint with presenter notes
- slidev build --watch no work HOT 4
- Router mode `hash` doesn't work with `--with-clicks` option when exporting to PDF
- Pdf rendering don't render linear gradient but png export works HOT 1
- Magic-move: Deep links don't result in the correct animation state
- Enhance `Arrow` component
- Misleading behavior when setting `at` to `0`
- Need help integrating large language models like ChatGPT to write code / content into nonprofit slides
- Bug on slide 5 of the demo deck `yarn create slidev` HOT 3
- Slides not exporting on build
- GitHub Actions deployment fails from fresh install HOT 1
- Lots of blank pages when exporting with any format using export. HOT 1
- Issue with MDC inline components HOT 1
- Pluggable Markdown transformers
- run build and get the wrong background images path HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slidev.