[GH-ISSUE #3240] File Browser markdown preview is unstyled (headings, lists, tables show as plain text) #1740

Closed
opened 2026-10-21 05:42:11 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kolacheee on GitHub (Jul 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3240

Originally assigned to: @kolacheee on GitHub.

What happens

In the Game Assets file browser, opening a .md file and switching to Preview shows the markdown with almost no formatting: headings are the same size as body text, bullet lists have no bullets, tables have no borders, and paragraphs run together with no spacing. The same markdown looks correct when it appears in a chat message.

Try it yourself

  1. Open a game campaign and go to the Game Assets file browser.
  2. Open any markdown file (or create one with a # Heading, a bullet list, and a table).
  3. Click Preview.
  4. Compare with how the same markdown renders inside a chat message — the chat version is styled, the preview is not.

Why it happens

The preview wrapper in packages/client/src/components/game-assets/FileEditorModal.tsx (line 178) uses Tailwind prose prose-sm classes, but the @tailwindcss/typography plugin is not installed anywhere in the client, so those classes do nothing. All of the markdown renderer's actual styles live in globals.css scoped under .mari-message-content, and the renderer joins paragraph runs with newlines, so the wrapper also needs whitespace-pre-wrap. Every working markdown consumer (chat messages, the game journal, the home-screen Professor Mari chat) already uses mari-message-content ... whitespace-pre-wrap.

Fix

One-line class swap in FileEditorModal.tsx to match the pattern used everywhere else. I'm taking this one (kolacheee) — PR to staging incoming.

Originally created by @kolacheee on GitHub (Jul 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3240 Originally assigned to: @kolacheee on GitHub. **What happens** In the Game Assets file browser, opening a `.md` file and switching to **Preview** shows the markdown with almost no formatting: headings are the same size as body text, bullet lists have no bullets, tables have no borders, and paragraphs run together with no spacing. The same markdown looks correct when it appears in a chat message. **Try it yourself** 1. Open a game campaign and go to the Game Assets file browser. 2. Open any markdown file (or create one with a `# Heading`, a bullet list, and a table). 3. Click **Preview**. 4. Compare with how the same markdown renders inside a chat message — the chat version is styled, the preview is not. **Why it happens** The preview wrapper in `packages/client/src/components/game-assets/FileEditorModal.tsx` (line 178) uses Tailwind `prose prose-sm` classes, but the `@tailwindcss/typography` plugin is not installed anywhere in the client, so those classes do nothing. All of the markdown renderer's actual styles live in `globals.css` scoped under `.mari-message-content`, and the renderer joins paragraph runs with newlines, so the wrapper also needs `whitespace-pre-wrap`. Every working markdown consumer (chat messages, the game journal, the home-screen Professor Mari chat) already uses `mari-message-content ... whitespace-pre-wrap`. **Fix** One-line class swap in `FileEditorModal.tsx` to match the pattern used everywhere else. I'm taking this one (kolacheee) — PR to `staging` incoming.
bsakaguchi 2026-10-21 05:42:11 +07:00
  • closed this issue
  • added the
    in-pr
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1740
No description provided.