Repository navigation
Update sheet shows the release notes of language-section bodies - #242
Merged
Merged
Conversation
…d footer A body with ## 中文 and ## English sections and a shared footer after --- was split at the rule, so the English pick landed on the footer. Language headings are now preferred, the text after the last rule is shown under the chosen section, and the old halves logic is the fallback.
3 tasks done
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.
Fixes the Mac launcher's update sheet showing only the install footer for v0.7.2.
What and why
Symptom: for v0.7.2 the sheet shows only "Install: download
NX2Apple-macOS-arm64.zip... 中文:..." and none of the release notes. The v0.7.2 body is## 中文,## English, then---and a shared install footer.Cause:
ReleaseNotes.lines(_:for:)split the body at---into two halves. For v0.7.2 that gives "both language sections" and "footer", so the English pick landed on the footer.Fix:
## 中文/## English, also###, or a line of just**中文**/**English**). The section for the interface language runs to the next language heading or a---.---that follows the language sections is a shared footer and is shown once under the chosen section.---halves and inline**中文**marker logic is the fallback when there are no language headings, and the whole body when nothing can be told apart.@LNPANDY release bodies in either shape (the old
---halves of v0.7.0 and the sectioned one of v0.7.2) now work.Checked
cd frontend && swift build -c release && swift test(455 tests, 0 failures),python3 scripts/patches.py check. New tests use the real v0.7.2 body as a fixture (frontend/Tests/Fixtures/release_v0.7.2.md) for en, zh and sv, plus heading variants, and v0.7.0 still passes: right bullets, footer once, nothing of the other language.NX_LAUNCHER_CAPTURE_DIR=<dir> swift testcaptures of the update sheet for v0.7.2 in en and zh, looked at: bullets then the install line, no other language.Scope
dm/,scripts/,docs/,ref/,AGENTS.md) is edited directly