mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3241] [MERGED] fix: use mari-message-content styles for File Browser markdown preview #5858
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5858
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3241
Author: @kolacheee
Created: 7/5/2026
Status: ✅ Merged
Merged: 7/5/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/file-editor-markdown-preview-styles📝 Commits (1)
7f32feafix: use mari-message-content styles for File Browser markdown preview📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
packages/client/src/components/game-assets/FileEditorModal.tsx(+1 -1)📄 Description
Fixes #3240
Summary
One-line class swap in
FileEditorModal.tsx: the markdown preview wrapper used Tailwindprose prose-sm max-w-noneclasses, but@tailwindcss/typographyis not installed anywhere in the client, so those classes were inert and the preview rendered as unstyled plain text. The wrapper now usesmari-message-content whitespace-pre-wrap break-words text-sm, the same pattern every working markdown consumer uses (ChatMessage,GameJournal,HomeProfessorMariChat).Why
Users previewing
.mdfiles in the Game Assets file browser see headings, lists, and tables collapse into undifferentiated plain text, while the exact same markdown renders correctly in chat. All of the markdown renderer's output styles (.mari-md-heading,.mari-md-ul,.mari-md-table, …) are scoped under.mari-message-contentinglobals.css, so the wrapper must carry that class for any styling to apply. The renderer also joins paragraph runs with\n, which is why the wrapper additionally needswhitespace-pre-wrap— without it, paragraph spacing collapses.Test plan
.mdfile in the Game Assets file browser, switch to Preview, and confirm headings, bullet lists, and tables are styled (matching how the same markdown looks in a chat message)pnpm checkpasses locally.UI Evidence
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.