Skip to content

fix: allow code tags to be displayed through the MarkdownViewer#5663

Merged
therealemjy merged 1 commit into
mainfrom
fix/markdown-code
Jun 29, 2026
Merged

fix: allow code tags to be displayed through the MarkdownViewer#5663
therealemjy merged 1 commit into
mainfrom
fix/markdown-code

Conversation

@therealemjy

Copy link
Copy Markdown
Member

Changes

  • allow code tags to be displayed through the MarkdownViewer component

@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ebfbc92

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@venusprotocol/evm Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dapp-preview Ready Ready Preview Jun 28, 2026 11:29am
dapp-testnet Ready Ready Preview Jun 28, 2026 11:29am
venus.io Ready Ready Preview Jun 28, 2026 11:29am

Request Review

@greptile-apps

greptile-apps Bot commented Jun 24, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds code to the list of allowed elements in MarkdownViewer so that inline code spans in governance proposal descriptions are rendered rather than stripped, with a text-b1s typography class applied. The change is small and targeted, but a debug console.log was accidentally left in Description/index.tsx.

  • MarkdownViewer: code added to allowedElements with a custom renderer; fenced code blocks (```) will render without a pre wrapper since pre remains excluded, collapsing multi-line blocks inline.
  • Description/index.tsx: contains a stray console.log(description.description) that must be removed before merging.
  • Changeset entry is correct.

Confidence Score: 3/5

Not safe to merge until the console.log is removed from Description/index.tsx.

The core MarkdownViewer change is straightforward and correct for inline code, but a debug console.log was left in the Proposal Description component and will print every proposal description to the browser console for all users in production.

apps/evm/src/pages/Proposal/Description/index.tsx needs the debug console.log removed before this is safe to ship.

Important Files Changed

Filename Overview
apps/evm/src/pages/Proposal/Description/index.tsx Unintentional console.log(description.description) debug statement left in production code — must be removed before merging.
apps/evm/src/components/MarkdownViewer/index.tsx Adds code to allowedElements and a renderer applying text-b1s styling; fenced code blocks will lose their pre wrapper since pre remains excluded.
.changeset/metal-cases-sell.md Patch changeset entry for the MarkdownViewer code tag fix — correct and complete.

Comments Outside Diff (1)

  1. apps/evm/src/pages/Proposal/Description/index.tsx, line 20-22 (link)

    P1 Debug console.log left in production code — this will log every proposal description to the browser console for every user who loads the Proposal page.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "fix: allow code tags to be displayed thr..." | Re-trigger Greptile

Comment thread apps/evm/src/components/MarkdownViewer/index.tsx Outdated
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for ./apps/evm

Status Category Percentage Covered / Total
🔵 Lines 81.95% 48788 / 59533
🔵 Statements 81.95% 48788 / 59533
🔵 Functions 62.67% 675 / 1077
🔵 Branches 73.1% 5542 / 7581
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/evm/src/components/MarkdownViewer/index.tsx 75% 80% 50% 75% 34-36, 39-41, 54-56, 65-71
Generated in workflow #13732 for commit ebfbc92 by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants