Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github Gists syntax highlight is not working

Tags:

github

gist

I am trying to create a gist with Markdown syntax highlight. Unfortunately can't post a screenshot here.

Then I press 'save' and get no syntax highlight applied. The same issue is there with Python code.

like image 358
Igor Avatar asked Feb 17 '15 12:02

Igor


People also ask

How do you highlight on gist?

For multiple click the start point, then shift + click the last line for the area highlight.

How do I highlight text in GitHub?

You can also create a Markdown hyperlink by highlighting the text and using the keyboard shortcut Command + V .

How do you highlight code in markdown?

To highlight code, write the name of the language the code is written in after the initial triple backticks. In the above example, the code is written in JavaScript, and hence javascript is added after triple backticks.

What does GitHub use for syntax highlighting?

We use Linguist to perform language detection and to select third-party grammars for syntax highlighting.


Video Answer


2 Answers

You need to change the file extension to .md

Here's my fork of your gist

like image 138
Swaraj Giri Avatar answered Nov 15 '22 12:11

Swaraj Giri


You have to add an extension for your language. Add .py not .md if you want python highlighting.

like image 29
smileBot Avatar answered Nov 15 '22 10:11

smileBot