export --format pptx: multi-line presenter notes are silently dropped
Bug report
slidev export --format pptx drops the presenter note entirely for any slide whose note spans more than one line of text. The note is parsed correctly and displays fine in Presenter Mode (noteHTML is correct), but comes out completely blank in the exported .pptx.
Reproduction
---
theme: default
---
## Slide A - one line note
- filler
<!--
Just one line here.
-->
---
## Slide B - two line note
- filler
<!--
Line one.
Line two.
-->npx @slidev/cli export slides.md --format pptxUnzip the resulting .pptx and check ppt/notesSlides/notesSlide{1,2}.xml:
- Slide 1's note ("Just one line here.") is present and correct.
- Slide 2's note is empty — no text at all, not partial/truncated, just gone.
This reproduces with or without per-slide frontmatter, with or without quote characters in the note, and regardless of the actual wording — the only variable that matters is whether the note's markdown source contains a literal newline. I confirmed via the compiled client bundle that noteHTML for slide 2 is correct (<p>Line one.\nLine two.</p>), so the markdown itself is parsed fine — the bug is specific to the pptx export path.
Likely cause
In the bundled @slidev/cli export module, genPagePptx (used for plain --format pptx, not pptx-editable — that goes through a separate exportPptxEditable path I have not tested):
const note = slides[slideIndex].note;
if (note) slide.addNotes(note);note is the raw markdown source, including embedded \n characters, passed straight to PptxGenJS#addNotes(). A multi-line string here appears to produce an empty notes text run in the generated notesSlideN.xml, even though note itself is non-empty. I haven't traced whether the root cause is on the pptxgenjs side (its own newline handling for notes text runs) or something upstream, but stripping/normalizing newlines (or splitting into separate paragraph/line runs) before calling addNotes() looks like it would fix it either way.
Correction: I originally (incorrectly) wrote that this also reproduces with --format pptx-editable. I never actually tested that format, and looking at the code again, pptx-editable goes through a different function (exportPptxEditable in a separate module) than the genPagePptx path described above — so I can't say whether it's affected. Apologies for the noise; leaving this note rather than silently editing it away.
Environment
@slidev/cli53.0.0@slidev/theme-default0.25.0- macOS (darwin arm64), Node v22.11.0
- Reproduced consistently across multiple independent test files with plain
--format pptx
Happy to share a minimal repro repo if useful.
Source: slidevjs/slidev