2

I've installed the Red Carpet gem and implemented it with my rails app. However, its readme doesn't really contain any information on the syntax.

Should the syntax be obvious, then? All of the git hub markdown appears to be parsed successfully into the expected html in my app, so can I use the git hub markdown as a resource to write a readme for my own application? Or are there slight changes and will I have to test every heading, bullet point and strike though?

If the syntax isn't universal, what is the Red Carpet markdown syntax?

Starkers
  • 10,273
  • 21
  • 95
  • 158
  • Only FYI: not only is the *syntax* of different MD parsers slightly different (strikethrough, for example, is not in John Gruber's original specs), but every implementation may have its own bugs and/or processing order as well. See http://johnmacfarlane.net/babelmark2/faq.html – Jongware May 20 '14 at 21:53
  • Should have known! No worries, when I write the jquery controls I daresay I'll get very antiquated with Red Carpet's way of doing things. – Starkers May 20 '14 at 21:55
  • 1
    The core/original syntax is documented at http://daringfireball.net/projects/markdown/syntax. Beyond that, it depends on [which *extensions*](https://github.com/vmg/redcarpet#and-its-like-really-simple-to-use) you choose to enable. – Jonathan Lonowski May 20 '14 at 21:57

1 Answers1

2

The original Markdown specification is at DaringFireball.net, which is where Markdown originated. You can usually assume that the syntax outlined there will work as expected, but there's no guarantee, as any independent implementation will usually have its own quirks.

Several implementations of Markdown (Reddit, GitHub, etc) have introduced their own additional syntax, and sometimes some tweaks to how special cases that make sense for their cases. This is generally documented - here's GitHub's outline of what they've added and changed. As @Jonathan Lonowski mentioned, RedCarpet seems to have several extensions that you can choose from that alter or add onto the behavior, depending on your needs.

cincodenada
  • 2,877
  • 25
  • 35