Repository navigation
feat: read about.json and parse the restricted Markdown subset - #66
Merged
Merged
Conversation
AboutReader reads about.json under the limits of docs/server-page.md: a file the launcher cannot use gives no zone, and a field that breaks its rule is left out on its own. Facts follow the launcher's vocabulary, not the file's order. MarkdownSubset turns descriptions, news and terms into blocks and spans: paragraphs, bold, italic, bullet lists, headings of level 2 and 3 and https links with the host to show. Images, raw HTML and other schemes stay literal text, and control and direction-changing characters are removed. LocalizedText picks the text for the interface language, then its base language, then English. Refs #57, #58 Co-Authored-By: Claude Sonnet 5.5 <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.
What
The data layer under the About and News zones and the Terms step, in
Launcher.Core, with no UI yet:AboutReaderreadsabout.jsonunder the limits ofdocs/server-page.md(16 KiB, tagline 80, fact 48, description 2000 characters,enrequired for the texts). A file the launcher cannot use gives no zone; a field that breaks its rule is left out on its own and the rest applies. Facts come back in the launcher's vocabulary order.MarkdownSubsetturns descriptions, news and terms into blocks and spans: paragraphs, bold, italic, bullet lists, headings of level 2 and 3, https links with the host to show (IDN hosts as punycode). Images, raw HTML and other link schemes stay literal text; control and direction-changing characters are removed; work is bounded (400 blocks, 2048-character links).LocalizedText.Picktakes the interface language, then its base language, thenen.Notes
The terms language fallback stays an open point in the doc (whether a German player agreeing to English terms is acceptable is a call for the maintainers);
Pickonly provides the mechanism.Tests
63 new tests (Launcher.Tests is now 465).
Refs #57, #58
🤖 Generated with Claude Code