Permalink
Browse files

Give up on everything that is right

  • Loading branch information...
1 parent 1467488 commit 83bd6b387bfb522d78e4a398f0f2cdfb7160f199 @vmg committed Dec 3, 2011
Showing with 18 additions and 18 deletions.
  1. +18 −0 lib/redcarpet.rb
  2. +0 −18 lib/redcarpet/compat.rb
View
@@ -53,3 +53,21 @@ def self.render(text)
end
end
+# Compatibility class;
+# Creates a instance of Redcarpet with the RedCloth
+# API. This instance has no extensions enabled whatsoever,
+# and no accessors to change this. 100% pure, standard
+# Markdown.
+class RedcarpetCompat
+ attr_accessor :text
+
+ def initialize(text, *_dummy)
+ @text = text
+ @markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
+ end
+
+ def to_html(*_dummy)
+ @markdown.render(@text)
+ end
+end
+
View
@@ -1,21 +1,3 @@
require 'redcarpet'
-# Compatibility class;
-# Creates a instance of Redcarpet with the RedCloth
-# API. This instance has no extensions enabled whatsoever,
-# and no accessors to change this. 100% pure, standard
-# Markdown.
-class RedcarpetCompat
- attr_accessor :text
-
- def initialize(text, *_dummy)
- @text = text
- @markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
- end
-
- def to_html(*_dummy)
- @markdown.render(@text)
- end
-end
-
Markdown = RedcarpetCompat unless defined? Markdown

0 comments on commit 83bd6b3

Please sign in to comment.