Comments (5)
I decided to invest some time into the issue
Here are the 2 problems
- The documented syntax broke in commit as the regex that detects latex blocks changed in 80be226#diff-345d7ee55c0f3c8202375b28cf816e5fdf5f246d760624b86ed2e6f22c1510f1R192
Now you the should not add a space between the highlighting lines blocks and {at}
```js{all|1|2|all}{at:0}
const thisVarChanged = "Highlight me first!"
const eyo = "then me!"
\```
- The reason why slidev doesn't automatically proceed to the next slide automatically when using the {at:} directive is the fact that slidev has a list of elements that are clickable.
In the case bellow we have 6 clickable elements.
```js{all|1|2|all}
const thisVarChanged = "Highlight me first!"
const eyo = "then me!"
\```
```js{all|1|2|all}{at:0}
const thisVarChanged = "Highlight me first!"
const eyo = "then me!"
\```
By default slidev will proceed to the next slide once the number of clicks > the number of clickable objects.
slidev/packages/client/logic/nav.ts
Line 68 in 8e603ec
By using the {at:X} directive the number of clicks < number of clickable elements.
slidev/packages/client/logic/nav.ts
Lines 88 to 93 in 8e603ec
That's why the click slide setting is currently needed
from slidev.
For anyone having the same issue, let met share this workaround:
- Stick to
v0.45.0
- Limit the number of clicks on the slide using the
clicks
property in the frontmatter (as explained here).
With these two steps I don't have the issue anymore.
from slidev.
For me, the workaround works too, but it's ugly. Especially given the fact that in docs, the scenario of two synchronized code blocks is highlighted as a main scenario.
from slidev.
I fixed the docs such that no-one would hang at the issue again for now
from slidev.
Some additional information: I have tried to reproduce the issue using Stackblitz, and got a different behavior:
- The lines on the first slide were highlighted in the same time (as expected) !
- 3 more clicks were needed to go to the second slide
- For the second slide, the behavior was the same as described in the issue description
Then I have noticed the version used by Stackblitz: v0.35.4
... After a npm update
to bump to v0.46.1
, the behavior was the same as described in the issue description for both slides.
So something has probably changed regarding this feature between those versions 🤔
from slidev.
Related Issues (20)
- Can not work without `shamefully-hoist` on pnpm HOT 7
- Can't Load custom theme.json with Shikiji HOT 4
- Prettier plugin/parser HOT 5
- Using global playwright-chromium in local slidev project HOT 1
- Ability to control the quality of the png export HOT 3
- Slidev ignores default props since v0.43 HOT 1
- Don't change package.json
- Iframe嵌入的时候会变得模糊,希望可以提供一个不错的解决方案 HOT 2
- Resolve error after migrating from 0.46.3 to 0.47.3 HOT 1
- Highlighter shiki adds a trailing new line to code blocks HOT 4
- Monaco is causing an infinite iframe recursion
- Basic accessibility like keyboard navigation (on the public facing slides)
- Slides cannot be modified on the side integrated editor
- Slide transitions leads to empty slides HOT 5
- Info: https://sli.dev/themes/gallery has no themes atm.
- ETARGET during `npm init slidev` HOT 3
- Can't use regular clicks on temporal form fields in slides HOT 4
- Emojis are rendered in black-only on PDF export. Presentation and PNG Export produces correct result. HOT 3
- Gallery, card, avatar, animation background, flexblock, ... more component support out-of-box HOT 3
- Attribute Inheritance at layout components cause problems HOT 1
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.