46

In the official github flavored markdown docs they show how we can use fences to mark code blocks, and optionally we can supply a language identifier, such as

```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```

Is there a language identifier for Objective C? I've searched and cannot find a reference.

Furthermore, is there a list of all supported language identifiers that can be used in github markdown?

asked Aug 9, 2012 at 19:47

3 Answers 3

85

The identifier is objective-c.

Here you can find a full list: http://coapp.org/reference/garrett-flavored-markdown.html

answered Aug 9, 2012 at 19:52
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the reference. Using objective-c provides almost no syntax highlighting, which is why I wanted it. But thanks to your list I discovered smalltalk, which provides for very colorful Objective C code in github :)
23

The identifier is

objc

See this example here where the author gets code highlighting to work: https://raw.githubusercontent.com/dchohfi/KeyValueObjectMapping/master/README.md

Here is another example as well: https://raw.githubusercontent.com/github/objective-c-style-guide/master/README.md

answered Aug 16, 2014 at 19:28

2 Comments

It seems to be 'objective-c'.
Using the redcarpet markdown parser, this gave me the best results. I found objective-c to provide little to no highlighting.
0

If you the other solutions from other do not work, please try objectivec that works in highlight.js and prism.js

answered May 28, 2015 at 8:52

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.