rtomayko/rocco — Issue #74: Redcarpet does not format docblocks properly
Author: lambda
Created: 2012-01-05 20:18:51+00:00
State: open

When running the unit tests with Redcarpet 2 installed (using `redcarpet/compat` to get a backwards compatible API), I get the following error:

1) Failure:
test_highlighted_in_blocks(RoccoDocblockAnnotationsTest) [/Users/lambda/src/rocco/test/test_docblock_annotations.rb:18]:
<"

Comment

\n\n

param type name

\n"> expected but was
<"

Comment\n> param type name

\n">.

This is due to there not being a blank line inserted between the paragraph and the blockquote, so Redcarpet just parses it as all part of one big paragraph.

This test works if I use RDiscount instead of Redcarpet.

I am wondering about the value of trying to support three different Markdown processors at once. Redcarpet changed their API entirely, though supplying a limited backwards-compatible API, and is more strict about separating blocks with blank lines. Bluecloth does not not support the `smart` option which is passed into `Markdown.new` (and throws an error for unknown options, so it fails to work entirely), and Redcarpet's backwards-compatible API ignores any options passed. Is it really important to support three different incompatible Markdown processors, or would it make sense to just switch to one, probably RDiscount as it seems to work best in Rocco?