Skip to content

fix: resolve markdown formatting and links rendering issues - closes #2707 - #2708

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
fix/markdown-formatting-and-links-rendering-e0c22ae81808b1af
Draft

fix: resolve markdown formatting and links rendering issues - closes #2707#2708
github-actions[bot] wants to merge 1 commit into
mainfrom
fix/markdown-formatting-and-links-rendering-e0c22ae81808b1af

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Problem

Users reported rendering issues on the "Tick and Flick" rule page:

  1. Bold markdown syntax (**) was being displayed alongside already bolded text instead of being properly parsed
  2. Links in video captions were rendering as raw URLs instead of formatted hyperlinks

The issue appeared multiple times on the rule and affected both figure captions and video descriptions.

Solution

Enhanced markdown parsing in two key components:

1. Figure Component (components/embeds/figure.tsx)

  • Updated renderFigureText() to handle bold markdown syntax (**text**) in addition to existing link parsing
  • The function now properly converts **text** to <strong> HTML elements
  • Maintains support for markdown links [text](url) alongside bold formatting

2. YouTube Components (components/shared/Youtube.tsx)

  • Added new renderMarkdownDescription() helper function to parse markdown in video descriptions
  • Updated YouTubePlayer and YouTubeShorts components to use the new markdown renderer
  • Descriptions now support both bold text and clickable links (internal and external)

Technical Details

Both components now follow the same markdown parsing pattern:

  1. Split text by markdown link patterns [text](url) using regex capture groups
  2. For non-link segments, further split by bold markdown patterns **text**
  3. Render each part appropriately (Link component for internal links, <a> for external, <strong> for bold, <span> for plain text)

This ensures that:

  • Bold markdown is properly rendered without showing raw asterisks
  • Links are clickable with proper styling instead of appearing as raw text
  • The solution works consistently across figure captions and video descriptions

Testing Recommendations

  1. Navigate to the "Tick and Flick" rule page
  2. Verify figure captions with bold text display correctly (no raw ** characters)
  3. Check video descriptions with links are clickable and properly formatted
  4. Test mixed formatting (bold text with links) to ensure both features work together

Generated by Issue Triage for issue #2707 · ● 214K ·

- Add support for bold markdown (**text**) in figure captions alongside existing link parsing
- Add markdown support for YouTube video descriptions (bold and link formatting)
- Apply same markdown parsing to YouTubeShorts component
- Fixes bold asterisks being displayed as raw text and links appearing as raw URLs

Closes #2707

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

🐛 Bug - Markdown formatting and links rendering incorrectly

0 participants