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

Get the language from fenced code blocks #167

Merged
merged 3 commits into from
Feb 7, 2019

Conversation

mxstbr
Copy link
Collaborator

@mxstbr mxstbr commented Feb 6, 2019

The markdown parser in draft-js-import-markdown seems to handle this correctly, the language is passed to the attributes, but it seems like draft-js-import-element does not.

Any ideas how to add support for this @sstur?

@mxstbr
Copy link
Collaborator Author

mxstbr commented Feb 6, 2019

This patch with a custom customBlockFn made it work for us downstream: withspectrum/spectrum@5a15944

I am not sure how best to integrate this into draft-js-import-element.

@sstur
Copy link
Owner

sstur commented Feb 7, 2019

Thanks @mxstbr!

@sstur sstur merged commit d099c68 into sstur:master Feb 7, 2019
@sstur sstur changed the title Add failing test for getting the language from fenced code blocks Get the language from fenced code blocks Feb 7, 2019
@mxstbr mxstbr deleted the code-block-languages branch February 7, 2019 09:33
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.

2 participants