Update RedCloth to 4.x

Use Bundler to manage RedCloth
gem. 4.x should be much faster
and less buggy. Unfortunately,
it doesn't support mixed
Textile/Markdown syntax. So
we keep an (appropriately
renamed) copy of 3.x around,
for the users of the "Mixed"
text filter.
This commit is contained in:
Jacques Distler 2010-11-03 23:32:55 -05:00
parent cca857ed3a
commit 4be1a58a24
5 changed files with 19 additions and 9 deletions

View file

@ -6,6 +6,7 @@ require 'maruku'
require 'maruku/ext/math'
require_dependency 'rdocsupport'
require 'redcloth'
require 'oldredcloth'
# The markup engines are Chunks that call the one of RedCloth
# or RDoc to convert text. This markup occurs when the chunk is required
@ -113,7 +114,7 @@ module Engines
class Mixed < AbstractEngine
def mask
@content.as_utf8
redcloth = RedCloth.new(@content, @content.options[:engine_opts])
redcloth = OldRedCloth.new(@content, @content.options[:engine_opts])
redcloth.filter_html = false
redcloth.no_span_caps = false
html = redcloth.to_html