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

Code blocks settings/modifiers #275

Closed
diegohaz opened this issue Feb 18, 2019 · 2 comments
Closed

Code blocks settings/modifiers #275

diegohaz opened this issue Feb 18, 2019 · 2 comments
Labels
🙋 no/question This does not need any changes

Comments

@diegohaz
Copy link

Hello,

I've been trying to get the string after the language on a code block like this one:

```jsx static

The idea is to pass it to my custom Code component so as to configure it in different ways. Unfortunately, this commit strips that part away on this line: https://github.com/rexxars/react-markdown/blob/51d71988191252ec74b3457561bc4f1330604b2e/src/ast-to-react.js#L70

I'd like to know if it's possible to overwrite this behavior and pass that part as a prop to my component.

Thank you

@ChristianMurphy
Copy link
Member

That information should be part of the meta attribute, see https://astexplorer.net/#/gist/03012fdfbeda182699c47e5816a5d11e/f84c0be87ac972ac8e180db7fe81d4f4b51a3d9c
If it isn't available, it may be resolved by #425 and/or #428

@wooorm
Copy link
Member

wooorm commented Oct 8, 2020

should be solved indeed

@wooorm wooorm closed this as completed Oct 8, 2020
@wooorm wooorm added the 🙋 no/question This does not need any changes label Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes
Development

No branches or pull requests

3 participants