Skip to content

Add sectionId and use data-section-id on section elements#77

Merged
nicpottier merged 4 commits intomainfrom
nicpottier/fix-llm-prompt
Feb 19, 2026
Merged

Add sectionId and use data-section-id on section elements#77
nicpottier merged 4 commits intomainfrom
nicpottier/fix-llm-prompt

Conversation

@nicpottier
Copy link
Contributor

Summary

  • Generates a stable sectionId (e.g. pg005_sec001) at page-sectioning time and passes it through LLM and template rendering
  • Uses data-section-id instead of data-id on <section> elements to avoid collision with the ADT translation system, which was replacing section innerHTML and destroying rendered content (including images)
  • Updates prompts, templates, styleguides, and all tests

Test plan

  • All 539 tests pass
  • TypeScript typecheck clean
  • Verify images appear correctly in v2 preview after re-rendering

…ments

Sections now get a stable sectionId (e.g. pg005_sec001) generated at
sectioning time, passed through to LLM and template rendering.

Use data-section-id instead of data-id on <section> elements to avoid
collision with the ADT translation system, which was replacing section
innerHTML and destroying rendered content including images.
@nicpottier nicpottier merged commit 78f559d into main Feb 19, 2026
1 check passed
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