Skip to content

Fix MIME regex matching for plain files - #371

Open
boazy wants to merge 1 commit into
sbarex:masterfrom
boazy:fix/plain-mime-regex-range
Open

Fix MIME regex matching for plain files#371
boazy wants to merge 1 commit into
sbarex:masterfrom
boazy:fix/plain-mime-regex-range

Conversation

@boazy

@boazy boazy commented Aug 1, 2026

Copy link
Copy Markdown

Summary

  • construct the MIME regex search range from mimeType instead of filename
  • cover matching with filenames both shorter and longer than the MIME value
  • verify that nonmatching MIME values remain rejected

Fixes #370.

Verification

$ Tests/PlainSettingsTests/run.sh
PlainSettingsTests passed
$ xcodebuild -project SourceCodeSyntaxHighlight.xcodeproj \
    -scheme 'Syntax Highlight XPC Service' \
    -configuration Debug \
    -derivedDataPath /tmp/SourceCodeSyntaxHighlight-derived \
    CODE_SIGNING_ALLOWED=NO build
** BUILD SUCCEEDED **

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.

MIME regex matching uses the filename range

1 participant