You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Elixir code snippets containing a tuple ({}) with two elements, where the first element is another tuple, cause the slidev CLI to crash with the following error:
4:21:35 p.m. [vite] Internal server error: Interpolation end sign was not found.
Plugin: vite:vue
File: /@slidev/slides/1.md:4:280
2 | <InjectedLayout v-bind="frontmatter">
3 | <CodeBlockWrapper v-bind="{}" :ranges='[""]'>
4 | <pre class="shiki shiki-themes vitesse-dark vitesse-light slidev-code" style="--shiki-dark:#dbd7caee;--shiki-light:#393a34;--shiki-dark-bg:#121212;--shiki-light-bg:#ffffff"><code class="language-elixir"><span class="line"><span style="--shiki-dark:#666666;--shiki-light:#999999">{{},</span><span style="--shiki-dark:#4C9A91;--shiki-light:#2F798A"> 1</span><span style="--shiki-dark:#666666;--shiki-light:#999999">}</span></span></code></pre>
| ^
5 | </CodeBlockWrapper>
6 | </InjectedLayout>
at createCompilerError (/Users/johngoff/Repos/presentations/lfe-for-elixir-programmers/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:1332:17)
at emitError (/Users/johngoff/Repos/presentations/lfe-for-elixir-programmers/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:2825:5)
at Object.onend (/Users/johngoff/Repos/presentations/lfe-for-elixir-programmers/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:2391:11)
at Tokenizer.finish (/Users/johngoff/Repos/presentations/lfe-for-elixir-programmers/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:1199:14)
at Tokenizer.parse (/Users/johngoff/Repos/presentations/lfe-for-elixir-programmers/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:1177:10)
at Object.baseParse (/Users/johngoff/Repos/presentations/lfe-for-elixir-programmers/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:2864:13)
at Object.parse (/Users/johngoff/Repos/presentations/lfe-for-elixir-programmers/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js:703:23)
at Object.parse$2 [as parse] (/Users/johngoff/Repos/presentations/lfe-for-elixir-programmers/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:1851:24)
at createDescriptor (file:///Users/johngoff/Repos/presentations/lfe-for-elixir-programmers/node_modules/@vitejs/plugin-vue/dist/index.mjs:74:43)
at transformMain (file:///Users/johngoff/Repos/presentations/lfe-for-elixir-programmers/node_modules/@vitejs/plugin-vue/dist/index.mjs:2367:34)
To Reproduce
Steps to reproduce the behavior:
Create a slides.md file with the following contents
```elixir
{{}, 1}
```
Start slidev with npm run dev
See the error in the terminal
This issue came about because I want to include a snippet of Elixir AST in my talk, this is the code from my slide. I tried to shrink it to the most minimally reproducing example I could, which is what you see above.
The issue is also reproducible with the following snippets of elixir code
{{nil}, 1}
{{:a},1}
{{},""}
So it seems to me that any valid elixir value can be the second argument of the tuple, and the first tuple can or can not have values and the issue still persists.
I believe this is due to incompatibilities with the Vue template syntax, but I expect that inside my codeblocks I can have valid code without issues. Please let me know if there's some escaping I should be doing that I'm not doing, this is my first presentation with slidev.
Desktop (please complete the following information):
Describe the bug
Elixir code snippets containing a tuple (
{}
) with two elements, where the first element is another tuple, cause the slidev CLI to crash with the following error:To Reproduce
Steps to reproduce the behavior:
npm run dev
This issue came about because I want to include a snippet of Elixir AST in my talk, this is the code from my slide. I tried to shrink it to the most minimally reproducing example I could, which is what you see above.
The issue is also reproducible with the following snippets of elixir code
So it seems to me that any valid elixir value can be the second argument of the tuple, and the first tuple can or can not have values and the issue still persists.
I believe this is due to incompatibilities with the Vue template syntax, but I expect that inside my codeblocks I can have valid code without issues. Please let me know if there's some escaping I should be doing that I'm not doing, this is my first presentation with slidev.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: