Skip to content

Render markdown/safe-HTML in issue messages with raw toggle#136

Merged
passcod merged 1 commit into
mainfrom
message-rendering
May 14, 2026
Merged

Render markdown/safe-HTML in issue messages with raw toggle#136
passcod merged 1 commit into
mainfrom
message-rendering

Conversation

@passcod
Copy link
Copy Markdown
Member

@passcod passcod commented May 14, 2026

Summary

Some event providers send issue messages formatted with markdown; others with limited HTML. Previously both were rendered as a monospace <pre> block, which was robust but looked terrible.

  • Extended the Markdown component to also accept inline HTML, sanitised against rehype-sanitize's default GitHub-compatible schema. Scripts, inline event handlers, iframes and the like are stripped; <b>, <a>, <code>, lists, etc. pass through. Adds a preserveNewlines option that turns soft line breaks into <br> for log-like input where newlines are significant.
  • New MessageView component renders the message through Markdown and adds a small icon toggle in the top-right to flip to the raw text (monospace, pre-wrap) for cases where the rendering hides detail that matters.
  • IssueRow's expanded body now uses MessageView instead of the raw <pre> block.

Added deps: rehype-raw, rehype-sanitize, remark-breaks.

@passcod passcod added this pull request to the merge queue May 14, 2026
Merged via the queue into main with commit edc0ee6 May 14, 2026
3 checks passed
@passcod passcod deleted the message-rendering branch May 14, 2026 05:10
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.

1 participant