Skip to content
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

Comments placed directly under page seperator in md files causes error #2051

Open
falconmick opened this issue Feb 4, 2025 · 0 comments
Open

Comments

@falconmick
Copy link

falconmick commented Feb 4, 2025

Describe the bug

If you start the slide with a comment it will crash out with the following:

[Vue warn]: Unhandled error during execution of component update 
  at <AsyncComponentWrapper> 
  at <SlideWrapper key="40" clicks-context= 
Object { current: Getter & Setter, clicksStart: 0, relativeSizeMap: Getter, maxMap: Getter, isMounted: Getter, setup: setup(), calculateSince: calculateSince(rawAt, size), calculateRange: calculateRange(rawAt), calculate: calculate(at), register: register(el, info)
, … }
 route= 
Object { no: 4, meta: Proxy, load: async load4()
, component: {…} }
  ... > 
  at <TransitionGroup id="slideshow" tag="div" class=""  ... > 
  at <SlidesShow render-context="slide" > 
  at <SlideContainer style= 
Object { background: "var(--slidev-slide-container-background, black)" }
 is-main="" onPointerdown=fn<onClick>  ... > 
  at <Play onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< 
Proxy { <target>: Proxy, <handler>: {…} }
 > > 
  at <RouterView> 
  at <App> [runtime-core.esm-bundler.js:51:12](https://rlmibmplyqgithub-lhp1--3030--d20a0a75.local-corp.webcontainer.io/node_modules/.pnpm/@vue+runtime-core@3.5.13/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js?v=d9ecd089)
Uncaught (in promise) DOMException: String contains an invalid character
    patchAttr runtime-dom.esm-bundler.js:620
    patchProp runtime-dom.esm-bundler.js:793
    mountElement runtime-core.esm-bundler.js:4873
    processElement runtime-core.esm-bundler.js:4820

My guess is the unplugin-vue-markdown library being used is making an empty component and causing a blow up inside of SlidesShow. Tonight has been the very first night I have ever used vue and my tooling isn't really setup to dig any further. I hope this helps.

The bug I would classify as somewhat important as if I wasn't so stubborn I would have 100% abandoned sli.dev and moved on as this broke my slideshow completely and was making it unusable. It took me so long to notice because I wrote the entire presentations words prior to the slides inside of my md file.

Minimal reproduction

---
<--
Wow Much Commpent
-->

---

Reproduction in stackblitz

NOTE: if there is a blank line between --- and <!-- the error goes away
NOTE: if you have no more slides on left and place a <!-- comment block the error does not happen

Environment

  • Slidev version: 51.0.2
  • Browser: Chrome/Firefox (appears logic not browser issue)
  • OS: Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant