Skip to content

Conversation

@masenf
Copy link
Collaborator

@masenf masenf commented Jan 15, 2026

No description provided.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 15, 2026

Greptile Summary

Updates markdown documentation and codebase to align with changes in reflex-dev/reflex#6085, which modifies the markdown component API. The key changes are:

  • Updated component_map key from codeblock to pre for code block rendering across all files
  • Changed heading component functions to accept str instead of list[str] parameters, removing array indexing (text[0]text)
  • Added comprehensive documentation for markdown plugins (default plugins, arbitrary remark/rehype plugins, and plugin options with examples)
  • Added support for nested markdown with quadruple backticks (````) through new DemoBlockNestedMarkdown classes
  • Updated dependency to point to the masenf/markdown-tlc branch containing the upstream changes

Confidence Score: 4/5

  • This PR is safe to merge with low risk, though it depends on an unreleased branch
  • The changes are well-structured and consistent across the codebase. The API changes (codeblock → pre, list[str] → str) are applied systematically. The new documentation is comprehensive and helpful. Score is 4/5 (not 5/5) because the reflex dependency points to a feature branch (masenf/markdown-tlc) rather than main or a released version, which means this website cannot be deployed to production until that branch is merged and released
  • Pay attention to pyproject.toml - the reflex dependency must be updated back to main or a release version before production deployment

Important Files Changed

Filename Overview
docs/library/typography/markdown.md Added comprehensive documentation for markdown plugins including default plugins, arbitrary plugins (remark/rehype), plugin options, and examples. Updated code block syntax and component_map examples to use 'pre' instead of 'codeblock'
pcweb/flexdown.py Added DemoBlockNestedMarkdown classes to handle nested markdown with quadruple backticks, updated component_map to use 'pre' key instead of 'codeblock' for code block rendering
pcweb/templates/docpage/blocks/headings.py Changed heading function signatures to accept string instead of list[str], updated functions to use text directly instead of text[0]
pyproject.toml Updated reflex dependency to point to masenf/markdown-tlc branch instead of main

Sequence Diagram

sequenceDiagram
    participant User
    participant MarkdownDocs as docs/library/typography/markdown.md
    participant Flexdown as pcweb/flexdown.py
    participant Headings as pcweb/templates/docpage/blocks/headings.py
    participant ReactMarkdown as react-markdown (upstream)
    
    Note over ReactMarkdown: react-markdown 10.0.0 changes<br/>'codeblock' → 'pre' in component_map
    
    User->>MarkdownDocs: Read markdown documentation
    MarkdownDocs->>MarkdownDocs: Update examples<br/>codeblock → pre<br/>Add plugin documentation
    
    User->>Flexdown: Render markdown content
    Flexdown->>Flexdown: Update component_map<br/>codeblock → pre<br/>Add DemoBlockNestedMarkdown
    Flexdown->>Headings: Call heading functions with text
    Note over Headings: Changed signature<br/>list[str] → str
    Headings->>Headings: Process text directly<br/>(no more text[0])
    Headings-->>Flexdown: Return rx.Component
    Flexdown-->>User: Rendered markdown
    
    Note over MarkdownDocs,ReactMarkdown: All changes ensure compatibility<br/>with react-markdown 10.0.0
Loading

You can now include nested markdown in headers and it will slugify it correctly
using hast-util-to-string to properly extract recursively nested elements.

Also includes a driveby fix for scroll-margin when the hosting banner is
displayed.
@adhami3310 adhami3310 merged commit 9ab214a into main Jan 15, 2026
10 checks passed
@adhami3310 adhami3310 deleted the masenf/markdown-tlc-fu branch January 15, 2026 22:47
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.

3 participants