weirdpattern / gatsby-remark-embed-gist

Gatsby remark gists preprocessor
MIT License
30 stars 15 forks source link

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

Open chivandikwa opened 5 years ago

chivandikwa commented 5 years ago

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.

weirdpattern commented 5 years ago

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.

chivandikwa commented 5 years ago

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

weirdpattern commented 5 years ago

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