Repository navigation
fix(markdown): resolve issue #245 formatting parser boundaries - #249
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying markdownviewer with
|
| Latest commit: |
473cece
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7a2cd657.markdownviewer.pages.dev |
| Branch Preview URL: | https://fix-issue-245-formatting-pip.markdownviewer.pages.dev |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
\color{name}{content}expressions for MathJax 3Issue #245 resolution
-and*bullets\$escapes are guaranteed literal\left\{...\right\}MathJax errorsmjx-merrornodes\color{...}{...}bleedingThe full rendering audit also found and fixed a separate lifecycle issue where Leaflet maps and Three.js STL canvases retained Split-pane dimensions after switching to Preview.
Reviewer follow-up: Marked already emitted two semantic
elements for Issue 2, but the viewer's collapsed 0.4em margins left only a 6.4px gap, making them appear merged. Adjacent list blocks now receive a 1em visual separation. For Issue 3, the exact no-comma example We spent \ which caused \ of loss and . renders as three literal dollars and zero math tokens; unescaped ordinary currency remains supported for compatibility.- full pre-removal run — static web/desktop parity passed; 160/160 Chromium tests passed (the removed test only loaded the intentionally omitted manual fixture; 159 retained tests remain)
- reviewer follow-up cases — 6/6 passed across Chromium, Firefox, and WebKit
- post-removal static parity check and focused Issue 2/3 Chromium tests — 2/2 passed
- focused rich-content suite — 14/14 passed
- timing-sensitive review reload test — 5/5 repeated runs passed
- exact shared Issue Multiple Markdown/LaTeX formatting bugs and renderer quirks #245 snapshot checked in Edit, Split, and Preview
- zero MathJax error nodes
- Issue 10 colors visually and structurally verified as scoped
- Issue 11 inline/display MathML parity verified
- maps and STL verified after Split/Preview width changes
- unique/Unicode anchors and repeated footnote backlinks verified
- unsafe HTML attributes and URL schemes still removed by DOMPurify
- no relevant browser console warnings or errors
- GFM behavior is preserved
- standard Markdown $ escapes always produce a literal dollar; existing unescaped-currency detection is retained
- supported Markdown Extra definition lists are preserved
- code blocks and inline code remain isolated
- standard MathJax color switches remain unchanged; only the viewer's legacy two-group compatibility form is normalized
- DOMPurify and the raw-HTML security policy remain intact
- web and desktop renderer sources remain synchronized
Root cause
Issue #245 exposed a shared architectural problem: document-wide regex preprocessing and naive large-document segmentation ran before Marked had established code, math, and block boundaries. Heading slug state, footnote state, and rich-renderer resize lifecycles also needed to be scoped to an entire render.
Definition lists remain the viewer's existing Markdown Extra extension. No new Markdown flavor or large dependency was introduced.
How it was tested
pm run test:e2e:cross-browser — 12/12 passed across Chromium, Firefox, and WebKit
Compatibility and security
Final status
Issue #245 is fully resolved. All confirmed bugs have been fixed, regression tests pass, the supplied snapshot renders correctly, and no relevant regressions were found.
Closes #245