tanoku/redcarpet — Issue #80: Where is RedCarpetCompat?
Author: lsegal
Created: 2011-12-03 04:20:27+00:00
State: open

Hi,

Currently YARD supports Redcarpet 1.x by using the RedCarpetCompat class (we rely on this class because we support multiple markdown libs with the same basic API, and not having to change APIs per markdown provider lib makes it easier for us to manage). It seems that Redcarpet 2.x is lacking this class, and this is a problem, because it means that support for this lib will eventually break whenever 2.x is officially released.

Because we don't force users to specific version numbers and we try to be as forgiving as possible for a wide range of versions, we don't actually have any checks to see if the user is on a specific version of a markup library. We usually attempt to make sure that YARD works with as many versions of a lib as we can reasonably support. That said, I'd rather not have to introduce my own hacks into YARD to support different versions of this library if redcarpet can do the fixing on its side before any real damage is done. That way, earlier versions of YARD will still be able to work with newer versions of Redcarpet, and everyone will be happy. Less bug reports for us, less bug reports for you, etc!

I've read around on the issues and see that the Markdown class is basically the same class as the one in question. It would be nice to see RedCarpetCompat aliased to Markdown just so that users don't have to see their code needlessly break. As it would be a one line const definition, it doesn't seem like a big maintenance burden.

Are there any issues with adding this class back (or an alias to Markdown via that constant)? If so, I would submit a patch, but it is just a one-liner :)