Reputation: 1282
I'm experiencing a small problem writing a README.md for a project on http://github.com, apparently I'm not able to syntax highlight my code. This is the first time I write a README.md on Github (although I have some experience with markdown on other platforms) so my problem can be a very stupid mistake by my side.
Using http://github-preview.herokuapp.com/ and entering some simple markup taken directly from Github docs:
```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```
I don't see syntax highlighting...
What am I doing wrong? Thanks for you your time
Upvotes: 4
Views: 11589
Reputation: 1
If you edited a README.md file directly in your GitHub repository, you would see the appropriate syntax highlighting. https://docs.github.com/en/get-started/writing-on-github/
Upvotes: 0
Reputation: 1323115
You would see the right syntax highlighting if you edit a README.md
directly in your GitHub repo.
But the kei-s/github-preview project doesn't support all the features of GitHub Flavored Markdown.
Upvotes: 3