Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classname is always undefined #802

Closed
4 tasks done
jpwallace22 opened this issue Dec 19, 2023 · 8 comments
Closed
4 tasks done

Classname is always undefined #802

jpwallace22 opened this issue Dec 19, 2023 · 8 comments
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on

Comments

@jpwallace22
Copy link

Initial checklist

Affected packages and versions

react-markdown@9.0.1

Link to runnable example

No response

Steps to reproduce

  • Receive text from an LLM response such as ChatGPT or Llama-2
    • ensured the response from the LLM included proper syntax and language name on gate
  • Pass text to ReactMarkdown as such:
    Screenshot 2023-12-18 at 4 20 05 PM
  • console.log(className)

Expected behavior

Classname should include the language

Actual behavior

Class name is undefined no matter what.

Runtime

Node v17

Package manager

yarn 1

OS

macOS

Build and bundle tools

Remix

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Dec 19, 2023
@JounQin
Copy link
Member

JounQin commented Dec 19, 2023

Reproduction please.

@ChristianMurphy ChristianMurphy added the 🙊 open/needs-repro This needs a reproduction label Dec 19, 2023

This comment has been minimized.

@jpwallace22
Copy link
Author

Reproduction please.

@JounQin Not sure the best way to make a reproduction without exposing API keys for an LLM.

@ChristianMurphy
Copy link
Member

@jpwallace22 that is part of producing a minimally reproducible example. https://stackoverflow.com/help/minimal-reproducible-example
If you believe the issue is with react-markdown and not with the LLM or another library, show an example of the issue without those pieces.
If it is an issue with react-markdown you can reproduce it with just the markdown that was produced from the LLM, which can be hardcoded.

@ChristianMurphy
Copy link
Member

There are also an assortment of sandboxes which can help simplify the process.

description codesandbox stackblitz
remark only (for markdown to markdown) codesandbox stackblitz
remark and rehype (for markdown to html) codesandbox stackblitz
react-markdown codesandbox stackblitz

@jpwallace22
Copy link
Author

jpwallace22 commented Dec 19, 2023

@ChristianMurphy Thank you so much for sandbox links. I was having trouble finding them on my own. 😅
Good call on getting it to repeat without the LLM response, I can't get it to reproduce. Which leads me to believe the failure is on my end somewhere.
I will close this out and if I need to reopen down the road I will do so with a better ticket and reproduction.
Happy holidays!

This comment has been minimized.

@ChristianMurphy ChristianMurphy added 👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually 🙊 open/needs-repro This needs a reproduction labels Dec 19, 2023
Copy link

github-actions bot commented Dec 19, 2023

Hi team! Could you describe why this has been marked as external?

Thanks,
— bb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

3 participants