SamyPesse / draft-js-prism

Code highlighting for DraftJS using Prism
http://samypesse.github.io/draft-js-prism/
Apache License 2.0
275 stars 36 forks source link

Tokens returned by Prism.tokenize() may have content which is an Array #11

Closed jjkavalam closed 7 years ago

jjkavalam commented 8 years ago

Example: "class MyClass {}" in "java" syntax

Such a case is handled by assuming that the array will always contain one element (this assumption is simply based on observations. A more thorough understanding will require looking to Prismjs code)

Fix for issue https://github.com/SamyPesse/draft-js-prism/issues/10

mxstbr commented 7 years ago

Hey, I've taken over this repo from Samy. Are you still interested in moving this PR forward? If so, how does it compare to #17 and #18?

mxstbr commented 7 years ago

I decided to merge #17, since it solves the issue really well. Thanks for taking the time to contribute to this module!