Open conorhastings opened 7 years ago
@conorhastings Hey, thanks for starting a new issue on a project I was about to start(and maybe saved me the hassle of writing it) :) I don't know how you found this haha
I checked out your PR, but it still contains <pre>
and <code>
tags... these need to be replaced in order for it to work on RN, correct?
@Naoto-Ida yeah that's a good point. potentially we could solve that by allowing optional codeElement and preElement props, that could be used by custom renderers targeting non web platforms
btw, I found it searching react-syntax-highlighter on github, ha.
@conorhastings OK. Could I start investigating that? I kind of need it for my app so was planning on writing a RN version of what you did, but if it can work without having two repositories, then that would be great.
@Naoto-Ida for sure! go for it
I'm going to try to land the custom renderer pr this weekend, if you want to work on submitting a PR allowing custom elements for code and pre tags, then I would recommend still using this repository but just to house the custom renderer.
@conorhastings 'this' being your repo?
sorry @Naoto-Ida by this
i meant the repo this issue is in, doing something similar to this -- https://github.com/conorhastings/react-syntax-highlighter-virtualized-renderer with a custom renderer, though it will also require the replace of the pre and code elements.
with custom renderer you should be able to map DOM tags to appropriate native tags.
It should get in soon -- see this PR -- https://github.com/conorhastings/react-syntax-highlighter/pull/54/files