andrewbranch / gatsby-remark-vscode

Gatsby plugin to provide VS Code’s syntax highlighting to Markdown code fences

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to parse a normal string?

mxmzb opened this issue · comments

commented

can i reuse some library or component from this plugin to run over a normal string, thereby syntax highlighting something in an actual gatsby component? something like https://github.com/conorhastings/react-syntax-highlighter ?

just asking out of curiosity, would save me from adding just another npm package and growing my assets size (and would potentially prevent code highlighting styles to differ).

If I understand you correctly, #53 is designed with this scenario in mind. My current plan is to fix/implement #57 first, then ship a v2.0.0 that includes a preview/alpha of #53, try it on my own blog, and gather feedback. I can’t promise a timeline since this is just a side project for me, but it’s very high on my priority list and I hope to finish it soon.

commented

yeah, https://github.com/andrewbranch/gatsby-remark-vscode/blob/aa9bda82a0127cb7d87f4c2f9a1608c8a05066c6/examples/example-site/src/templates/react-blog-post.js looks kind of like what i am looking for. still bit of boilerplate imho but i don't want to be picky.

thanks for the outlook on your roadmap and thank you so much for your time and effort doing this, i sincerely appreciate it!! 🙏🙏🙏

This is well underway in v2! There’s a GraphQL resolver that can be called with raw source text.

image