From c2a25f50a000f9b2e5507dcecf947dbe1e49799c Mon Sep 17 00:00:00 2001 From: elliottcable Date: Sun, 18 May 2008 01:50:54 -0800 Subject: [PATCH] Switching to maruku, it should fix some of the markdown rendering problems --- README.mkdn | 3 ++- lib/git-blog/parser/markdown.rb | 4 ++-- lib/git-blog/parser/textile.rb | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.mkdn b/README.mkdn index 0d021c2..44a27ab 100644 --- a/README.mkdn +++ b/README.mkdn @@ -42,7 +42,8 @@ To run git-blog, you need the following gems: * gem install git * gem install haml (if you wish to create your templates or write your posts in haml) -* gem install RedCloth (if you wish to write your posts in Textile or Markdown) +* gem install RedCloth (if you wish to write your posts in Textile) +* gem install maruku (if you wish to write your posts in Markdown) To develop and contribute to git-blog, you also need: diff --git a/lib/git-blog/parser/markdown.rb b/lib/git-blog/parser/markdown.rb index 0b53d6a..553e2cf 100644 --- a/lib/git-blog/parser/markdown.rb +++ b/lib/git-blog/parser/markdown.rb @@ -1,11 +1,11 @@ -require 'redcloth' +require 'maruku' module GitBlog module Parsers module Markdown def self.parse input input.gsub!(/^(.*)\n=+(\n\s+)*\n/m, '') - ::RedCloth.new(input).to_html [:markdown, :textile] + ::Maruku.new(input).to_html end end end diff --git a/lib/git-blog/parser/textile.rb b/lib/git-blog/parser/textile.rb index d80789c..26866a9 100644 --- a/lib/git-blog/parser/textile.rb +++ b/lib/git-blog/parser/textile.rb @@ -5,7 +5,7 @@ module GitBlog module Textile def self.parse input input.gsub!(/^(.*)(\n\s+)*\n/m, '') - ::RedCloth.new(input).to_html [:textile, :markdown] + ::RedCloth.new(input).to_html end end end -- 2.11.4.GIT