zed icon indicating copy to clipboard operation
zed copied to clipboard

Inline code blocks don't show in the markdown preview.

Open mikayla-maki opened this issue 1 year ago • 0 comments

Currently there are three separate, partially implemented markdown renderers in the Zed codebase:

  • rich_text::RichText, used by the markdown renderer and chat messages, specialized to support @mentions and style code blocks, caching, doesn't support inline code regions (the `)
  • markdown_renderer::Render, used by the markdown renderer, supports blocks like lists, tables, and headlines, non-caching
  • language::markdown, used by the editor popovers, provides caching, supports inline code regions and lists.

These implementations have been developed organically and are specialized to their use cases. We should be intentional about what parts of this we unify and which we leave separate. But that said, it would be nice to:

  • Ensure that all normal markdown syntax is supported everywhere (inline-code blocks)
  • Support fancy markdown tables and such in the channel chat, because it's fun
  • Have all markdown parsing be cached by default

Regardless of how that effort turns out though, inline-code blocks not rendering in the markdown preview is a bug, and should be fixed.

Reproduction steps:

  1. Make a markdown file, add some text including an inline code block
  2. Open the markdown preview
  3. 💥 the inline code block is not rendered

mikayla-maki avatar Feb 01 '24 17:02 mikayla-maki