Repository navigation
open app rendering - #3
Merged
luca-chen198 merged 2 commits intoApr 28, 2026
Merged
Conversation
luca-chen198
deleted the
2-markdown-does-not-trigger-when-on-first-render
branch
April 28, 2026 11:24
Jon-Schneider
added a commit
to Jon-Schneider/swift-markdown-engine
that referenced
this pull request
Jul 10, 2026
A Fable adversarial review of the per-element styling branch surfaced a set of opt-in paths that were broken or misbehaving. The `.default` look was already byte-identical and stays so; these fix the knobs themselves. - Font weight (findings nodes-app#1/nodes-app#4): `withWeightCompat` was a silent no-op on every NAMED font — including the engine's own default "SF Pro" — because a weight trait added to a descriptor already pinned to a PostScript face is ignored by CoreText. It now re-keys on the font family so the real weighted face is selected, folding weight + symbolic traits into ONE match (a second `withSymbolicTraits` pass re-matches and drops the weight, even for an empty trait set — caught by the new tests). Ordered numbers are re-measured to match exactly what is styled: the marker in the weighted font, the spacer in the base font, and task items (whose number is hidden behind a checkbox) stay in the base font so the hanging indent can't drift. - Link underline (nodes-app#2): `underlinesResolvedLinks = false` did nothing on macOS because `NSTextView` re-underlines `.link` ranges via `linkTextAttributes`; the text storage is now the single source of truth on both platforms. - Image rounding (nodes-app#5): `ImageEmbedStyle.cornerRadius` clipped tables and block LaTeX, which share the `.latexImage` draw path. A new `.imageEmbedRoundable` anchor attribute restricts rounding to genuine image embeds. - Inline-code pills (nodes-app#3/nodes-app#9/nodes-app#10): pills now punch active-selection rects out of their fill (like the code-block background) so selecting text under a pill keeps the highlight; the rendering surface is extended by the pill padding so an edge pill isn't clipped; oversized corner radii are clamped to half the shorter side so short pills don't glitch on iOS. - Checkboxes (nodes-app#6): an invalid/OS-missing SF Symbol name fell through to a hidden `[ ]` glyph, leaving an invisible-but-toggleable checkbox; it now falls back to the stock symbol. - Empty `HeadingStyle.fontWeights` (nodes-app#7) no longer traps; it falls back to `.bold`. Adds FontWeightCompatTests and WeightStylingConfigTests pinning the weight resolution and ordered-number indent behavior. 483 tests pass; iOS builds clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Jon-Schneider
added a commit
to Jon-Schneider/swift-markdown-engine
that referenced
this pull request
Jul 10, 2026
A second adversarial pass (Codex) caught a real default-rendering regression introduced by the earlier link fix, plus two hardening gaps. - Link display (Codex nodes-app#1, HIGH — regression): the interim link fix set `NSTextView.linkTextAttributes` to a cursor only, stripping the stock color+underline. But auto-detected URLs and RESOLVED wiki-links carry only `.link` (no storage color/underline of their own) and depend on that dictionary for their entire appearance — so on `.default` they lost their underline and rendered in body-text color. `linkTextAttributes` is now derived from the config: the theme link color plus a conditional underline. The default `.linkColor` look is byte-identical, and `underlinesResolvedLinks` now governs Markdown links, auto-links, and wiki-links uniformly. Adds MacOSLinkAttributesTests. - Weight vs bold base (Codex nodes-app#3, MEDIUM): `withWeightCompat` now strips the bold symbolic trait before folding the requested numeric weight, so a bold BASE font can't override a lighter requested weight (italic and other symbolic traits are still preserved). - Non-finite padding (Codex nodes-app#4, LOW): inline-code `cornerRadius` / `horizontalPadding` are guarded for `.isFinite` before use, so an `.infinity`/NaN config can't inflate the pill or the rendering surface to unbounded geometry. Deferred (documented as a known macOS limitation in CHANGELOG): Codex nodes-app#2 — changing a styling knob or theme color after mount doesn't re-render on macOS until the next edit. This is a pre-existing macOS-wide behavior (theme colors already behaved this way); live reconfiguration is a tracked follow-up. iOS already live-updates. 485 tests pass; macOS + iOS build clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Jon-Schneider
added a commit
to Jon-Schneider/swift-markdown-engine
that referenced
this pull request
Jul 10, 2026
… coverage Codex re-review sign-off follow-ups (findings nodes-app#1/nodes-app#3/nodes-app#4 verified fixed): - CHANGELOG: the "known limitation" text said a post-mount configuration change doesn't apply "until the next edit", implying an edit would apply it. It won't — the coordinator keeps its mount-time configuration and restyling reads that stale copy, so a styling/theme change takes effect only when the editor is reconstructed. Reworded to say so precisely. - Tests: add bold-base -> regular and bold-italic-base -> regular-italic cases to FontWeightCompatTests, directly covering the nodes-app#3 fix (a bold base font no longer overrides a lighter requested weight; italic is preserved). 487 tests pass; macOS + iOS build clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
No description provided.