Skip to content

A deck read back carries no title it never had, and the slides example says what it needs - #49

Merged
fabeat merged 4 commits into
mainfrom
fix/reverse-title-and-example
Nov 8, 2026
Merged

fabeat merged 4 commits into
mainfrom
fix/reverse-title-and-example

Conversation

@fabeat

@fabeat fabeat commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Two fixes, both from the review of the 0.4.0 release.

A deck read back into Markdown carries no title it never had

PowerPointToMarkdown wrote dc:title into the deck's frontmatter as it stood. PHPPresentation gives every deck the title Untitled Presentation, and that is the library's own default rather than a title somebody wrote — so a deck without a title came back with one, and drawing that Markdown again put a title placeholder and the words "Untitled Presentation" on a slide that never had a title.

The frontmatter now carries a title where the deck has one: the package's own title, or the first slide's where the package carries none. The frontmatter is the first slide's, and a title: in it is that slide's title, so a deck whose title is on its slide and nowhere else keeps it — and a deck with no title at all comes back with no title: line.

It is the first slide's title and not a later one's, the way it is in the other direction: a title: in the first slide's frontmatter is that slide's title and wins over its own heading. So a deck whose second slide has a title and whose first does not gains no title.

The round trip is a round trip now. deck.md → deck.pptx → deck.md → deck.pptx draws the same slide every time:

before after
the slide's text in the second deck Untitled Presentation / OneText. One / Text.
the Markdown never settled settles after one turn

The slides example says what it needs

examples/build.php required ../vendor/autoload.php outright. The mdword skill bundle carries this half's gallery as examples/slides/ and ships no vendor/, so the build died with a PHP fatal error that said nothing about what was missing.

It says what the build needs and stops, the way markdown-word's own examples/build.php has said it for a while — the two halves ship side by side in one bundle, so they fail the same way:

This build needs the library itself: put a vendor/autoload.php in this directory's parent, or run composer install in the checkout it came from.

No release is cut here; the ## [Unreleased] section of the changelog carries both.

The rule for the title was in the frontmatter's docblock and again in the
method that decides it, the two defaults each said the same thing twice, and
the tests' comments repeated what the names of the tests already say.

What is left is what the code cannot say: that PHPPresentation's own defaults
are not a title or a name somebody wrote, and that the frontmatter is the
first slide's.
@sonarqubecloud

sonarqubecloud Bot commented Nov 8, 2026

Copy link
Copy Markdown

@fabeat
fabeat merged commit 199d0c0 into main Nov 8, 2026
16 of 17 checks passed
@fabeat
fabeat deleted the fix/reverse-title-and-example branch November 8, 2026 10:37
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

Successfully merging this pull request may close these issues.

1 participant