Skip to content

[EuiMarkdownFormat] Passing an unknown language to a code block crashes the Markdown renderer #8728

Closed

Description

@tkajtoch

Describe the bug

When an unknown (unregistered) language is passed to a code block, the component falls back to rendering passed children as plain text with no Markdown formatting applied.

Impact and severity

This is a user-facing issue that has been reported internally.

Environment and versions

  • EUI version: 102.2.0
  • React version: 18.2
  • Kibana version (if applicable): N/A
  • Browser: N/A
  • Operating System: N/A

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://eui.elastic.co/docs/components/editors-and-syntax/markdown/format/#built-in-plugins
  2. Edit the markdownContent variable value to:
    # Hello, World!
    ~~~blah
    console.log(123);
    ~~~
    
  3. See the whole Markdown content being rendered as plain text with no Markdown formatting applied to either the heading or the code block

Activity

  1. self-assigned this
    on Jun 2, 2025
  2. added
    ⚠️ needs validation
    on Jun 2, 2025
  3. added theissue type on Jun 2, 2025
  4. removed
    ⚠️ needs validation
    on Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions