gatsby-remark-embed-gist icon indicating copy to clipboard operation
gatsby-remark-embed-gist copied to clipboard

Possibility to emit code fence and not html that already has syntax highlighting?

Open chivandikwa opened this issue 5 years ago • 3 comments

Is there currently a way to make the gatsby-remark-embed-gist plugin emit a code fence similar to manually adding code with markdown, something like

var sampleCode = "awesome"

This would then make it possible to use the embedded gist with any other plugin you may have configured to do syntax highlighing. This is super useful in my case where I already use gatsby-remark-vscode with customization for code I add manually and would like my embedded gists to look exactly the same.

chivandikwa avatar Jun 08 '19 11:06 chivandikwa

Hi @chivandikwa thanks for reporting this.

I think this is possible, but it will require a major change to the way the plugin loads the gist. The safest bet would be calling the Gist API.

I will look into this and get back to you by end of the week.

weirdpattern avatar Jun 10 '19 17:06 weirdpattern

Thanks fore the response @weirdpattern I appreciate you looking into it

chivandikwa avatar Jun 10 '19 18:06 chivandikwa

I haven't had a chance to look at this... but I promise I will get to this soon...

weirdpattern avatar Jul 22 '19 03:07 weirdpattern