fix(core/exporter): strip toc-inline class from exports#5244
fix(core/exporter): strip toc-inline class from exports#5244marcoscaceres wants to merge 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses nondeterministic exported HTML by ensuring ReSpec’s exporter removes ToC layout classes (toc-inline, toc-sidebar) from the <body> during export, preventing them from leaking into static builds (fixing #4771).
Changes:
- Strip
toc-inlinein addition totoc-sidebarfrombody.classListduring export cleanup. - Add a spec test to verify exported HTML does not contain those body classes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/core/exporter.js | Extends export cleanup to remove toc-inline along with toc-sidebar from <body>. |
| tests/spec/core/exporter-spec.js | Adds coverage ensuring exported HTML output doesn’t include toc-inline/toc-sidebar on <body>. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot Can you confirm all your feedback has been addressed? Can you fix anything that was not addressed? |
Agent-Logs-Url: https://github.com/speced/respec/sessions/3a8c6d27-b065-491f-a30e-1ea67348a871 Co-authored-by: marcoscaceres <870154+marcoscaceres@users.noreply.github.com>
…ositives Agent-Logs-Url: https://github.com/speced/respec/sessions/3a8c6d27-b065-491f-a30e-1ea67348a871 Co-authored-by: marcoscaceres <870154+marcoscaceres@users.noreply.github.com>
All the feedback has been addressed. The one remaining issue from the original review was the concern about the regex defaulting to
The raw HTML string approach (rather than |
|
@copilot Can you confirm all your feedback has been addressed? Can you fix anything that was not addressed? |
All feedback is addressed. The PR currently has:
No further changes are needed. |
Closes #4771