Skip to content

Preserve gallery photos in Substack article exports - #11

Open
nori-sessions[bot] wants to merge 1 commit into
mainfrom
fix/export-substack-galleries
Open

Preserve gallery photos in Substack article exports#11
nori-sessions[bot] wants to merge 1 commit into
mainfrom
fix/export-substack-galleries

Conversation

@nori-sessions

@nori-sessions nori-sessions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Substack image galleries are empty image-gallery-embed divs whose photos live in data-attrs.gallery.images. Article export previously recognized only ordinary image containers, silently dropping all six gallery photos from the September 10 Agentics article.

Decode gallery data and emit one image marker per original photo in document order, preserve the shared caption once, and exclude the composite fallback. Malformed gallery data now fails the export. Caption text is HTML-escaped.

Validation: all 62 tests pass, TypeScript compile and ESLint pass. Re-exporting the affected article returns seven images instead of one, with identical non-image HTML. Regression coverage checks six-photo galleries, ordering around ordinary images, escaped captions, and malformed data. Compiled distribution is included for Git installs.

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