Silent Slide drop on missing separator
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- Half a day
- Newbie friendliness
- 82/100
Research direction
Start in src/presentations/spec_parser.py, especially _split_slides_fence_aware and _parse_slide, then run the checked-in mse.py reproduction with uv run. Done means consecutive slide headers are split into separate slides, the three-slide example renders all three, and a warning identifies the header missing its separator.
Written by the indexing model from the issue text.
Description
Summary
A spec that defines N slides renders only N−1, with no warning, when the author omits a --- separator between two ## [type] headers. The second slide's heading and bullets are silently swallowed into the first slide's speaker notes.
Impact
High — a one-character authoring typo causes silent, unreported data loss (a whole slide disappears). Affects all spec parsing.
Environment
ms-presentationsversion: 0.1.6- Python version: 3.10+
- OS / version: reproduces on all (pure parser logic; verified on Windows 11)
- Install method: pip / from source
- Relevant deps (if Azure path): n/a — parser only, no Azure
- Azure / model config: n/a
Steps to Reproduce
- Write a spec with two consecutive
## [type]slides but no---between them. - Parse/render the spec.
- Observe the deck has one fewer slide than authored, with no warning.
Minimal Reproducible Example (MRE)
The script below is also checked in as mse.py in this folder.
# /// script
# requires-python = ">=3.10"
# dependencies = ["ms-presentations==0.1.6"]
# ///
"""Self-contained MRE — Silent slide drop on a missing '---' separator.
Run with: uv run mse.py (no venv, no Azure, no network)
When the '---' separator between two '## [type]' headers is missing, the second
slide is folded into the first slide's notes and dropped. The spec below defines
three '## [content]' slides; the rendered deck contains only two. The dropped
slide is the observable error — the deck itself is the only output.
"""
import os
import tempfile
from presentations.cli import main
SPEC = """\
---
title: Repro - Silent slide drop
output: Silent_Slide_Drop.pptx
---
## [content] Slide One (renders)
- Properly separated by a --- below.
**Notes**: First slide.
---
## [content] Slide Two (absorbs slide three)
- This slide is followed by a '## [content]' header below,
- but there is NO '---' separator between them.
**Notes**: Everything below, including Slide Three, gets swallowed here.
## [content] Slide Three (silently dropped)
- These bullets never become their own slide.
**Notes**: Expected 3 slides, actual 2.
"""
with tempfile.TemporaryDirectory() as d:
spec_path = os.path.join(d, "minimal.spec.md")
with open(spec_path, "w", encoding="utf-8") as f:
f.write(SPEC)
main([spec_path, "-o", os.getcwd()]) # renders the deck into the PWD
uv run mse.py
Expected Behavior
The parser produces 3 slides — and ideally emits a warning naming the header that lacked a separator.
Actual Behavior
parse_spec returns 2 slides; "Slide Three" is absorbed into "Slide Two" notes. No warning is printed and rendering succeeds, hiding the loss.
Additional Context
Root cause: _split_slides_fence_aware (src/presentations/spec_parser.py:40-57) splits only on --- lines. With no separator both headers land in one chunk; _parse_slide (spec_parser.py:81) matches the first header and treats everything after the first **Notes**: as that slide's notes.
Suggested fix: when a second ## [type] header appears in a chunk that already has one (and not inside a code fence), start a new chunk and print a warning naming the offending header. Fully isolated — different file, no shared state with any other fix.
- Dominant language
- Python
- Stars
- 10
- Forks
- 3
- Avg merge
- 24d 6h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/presentations
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
microsoft/presentations#12 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/presentations#11 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microsoft/presentations#10 ·
-
Difficulty 5/5 Over a week Newbie friendliness 48/100
microsoft/presentations#18 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoft/presentations#17 · 1 comment ·
All issues in microsoft/presentations
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100