A
Albert Schlef
I understand this question is a little off-topic here, but the
documentation on GitHub.com doesn't help me.
Here's the story:
GitHub allows one to use various markup languages when editing wiki
pages. By default is used some modified Markdown.
We're told to indent code blocks by 4 spaces (at least). It works
alright.
But there's more:
When I click the "Help" link (in the textarea) I see, under the "Code"
section, that we can also highligh code. Cool. So I want to highlight
the Ruby code I type into wiki pages. The example they give there isn't
quite clear. If I understand correctly, typing the following:
```ruby
def foo
puts 'bar'
end
```
Should result in highlighted code. In other words, the first line should
contain 3 backticks immediately followed by the string "ruby", and the
block needs to end in 3 more backticks. It doesn't work: the code isn't
highlighted. I'm not surprised: I probably don't read the example
correctly.
So, does anybody know how to highlight Ruby code on GitHub?
documentation on GitHub.com doesn't help me.
Here's the story:
GitHub allows one to use various markup languages when editing wiki
pages. By default is used some modified Markdown.
We're told to indent code blocks by 4 spaces (at least). It works
alright.
But there's more:
When I click the "Help" link (in the textarea) I see, under the "Code"
section, that we can also highligh code. Cool. So I want to highlight
the Ruby code I type into wiki pages. The example they give there isn't
quite clear. If I understand correctly, typing the following:
```ruby
def foo
puts 'bar'
end
```
Should result in highlighted code. In other words, the first line should
contain 3 backticks immediately followed by the string "ruby", and the
block needs to end in 3 more backticks. It doesn't work: the code isn't
highlighted. I'm not surprised: I probably don't read the example
correctly.
So, does anybody know how to highlight Ruby code on GitHub?