Repository navigation
Add export appearance preference - #25
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13d598d66a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| title: filePath ? extensionless(filePath) : documentTitle(latest), | ||
| includeOutline: false, | ||
| theme: preferences.theme === 'dark' ? 'dark' : 'light', | ||
| theme: exportTheme, |
There was a problem hiding this comment.
Isolate the export theme from live Mermaid previews
When the export appearance differs from the editor—for example, Dark export with a Light editor—passing this theme to createExportHtml calls the global mermaid.initialize(...) even if the document contains no diagram. DiagramCodeBlockEditor.tsx uses that same Mermaid singleton for subsequent preview renders without reinitializing it, so editing or adding a diagram after exporting renders it with the export palette rather than the editor palette. Render exports without mutating the shared configuration, or restore/reapply the editor configuration afterward.
Useful? React with 👍 / 👎.
Summary
createExportHtmltheme input for TypeOpen HTML/PDF/PNG/print renderingSafety boundary
Validation
npm run verify: 28 suites / 136 tests PASSIndependent read-only review is running on exact head 13d598d.