Skip to content

Put MXP images and sounds in their T= directory, and keep a short extended colour's components - #81

Merged
HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-g3zsec
Nov 7, 2026
Merged

HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-g3zsec

Conversation

@HarryCordewener

@HarryCordewener HarryCordewener commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Requested by Grave · project thread

Two things SharpClient's old parser did that 2.26.0's decoder does not, found while moving SharpClient onto the decoder.

  • MXP T=. <IMAGE map.png URL="https://h/img/" T=maps> decoded to https://h/img/map.png. The MXP spec appends the class name to the URL before the file name, so it is now https://h/img/maps/map.png. SOUND/MUSIC take T= the same way under U=. Without a base address the file is left as it is.
  • Short extended colour. \e[31;38;2;40m read the trailing 40 as SGR 40 (black background). The components of a truncated 38;2/48;2 are now consumed with it, and the colour is left as it was.

Docs (docs/decoding.md) and the changelog (## Unreleased) are updated. MarkupString.Tests: 1527 passed, 0 failed.

SharpClient needs both for its port, so it will reference the release that carries this (2.26.1 if you tag it as a patch).


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • MXP image and sound paths now include the optional type directory between the base address and filename.
    • Incomplete extended colour sequences no longer change the current colour or cause leftover values to be interpreted as separate codes.
  • Documentation
    • Clarified how incomplete extended colours are handled and how MXP image, sound, and music sources are selected.

…ended colour's components

MXP IMAGE and SOUND appended the file to URL= (U=) but dropped T=, which
the specification puts between them. SGR 38;2;40 left the 40 to be read
as a black background.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rqqt7TnKiMidjBirFcUqtL
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The changes update MXP image and sound source paths to include the optional T directory. They also change how the SGR parser handles incomplete extended RGB parameters. Tests, decoding documentation, and the changelog cover these changes.

Changes

MXP Media Addresses

Layer / File(s) Summary
Build and verify MXP media source paths
MarkupString.Mxp/Decoding/MxpDecoding.cs, MarkupString.Tests/Decoding/MxpDecodingTests.cs, docs/decoding.md, CHANGELOG.md
Image and sound addresses now include the optional T directory between the base URL and filename. Tests cover slash normalization and an image without a URL. The documentation describes source selection, and the changelog records the fix.

Truncated SGR Colours

Layer / File(s) Summary
Handle incomplete extended RGB parameters
MarkupString.Ansi/Decoding/VtPlugins.cs, MarkupString.Tests/Decoding/VtDecodingTests.cs, docs/decoding.md
When an extended RGB sequence has fewer than three components, the parser consumes the remaining parameters and returns no colour. A test checks that the prior foreground remains and no background is set. The documentation describes this behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Merge Risk: Low · up to 75207

Some positional media tags produce incorrect paths. Named T attributes provide a workaround.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@HarryCordewener HarryCordewener self-assigned this Nov 7, 2026
@HarryCordewener
HarryCordewener marked this pull request as ready for review November 7, 2026 00:27
@HarryCordewener
HarryCordewener merged commit 3039aaa into main Nov 7, 2026
6 of 7 checks passed
HarryCordewener pushed a commit that referenced this pull request Nov 7, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rqqt7WA8C5XG14TAWB6b9V
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants