From 3468f0a2c3643c0417d52feb895da7ef2d7a47d2 Mon Sep 17 00:00:00 2001 From: laumann Date: Wed, 9 Feb 2011 01:37:30 +0100 Subject: [PATCH] expanded config yaml to allow setting hard_breaks=false on RedCloth, modified textile converter to take this option into account --- lib/jekyll.rb | 3 +++ lib/jekyll/converters/textile.rb | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 7928850c..59cd1dec 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -90,6 +90,9 @@ module Jekyll 'coderay_bold_every' => 10, 'coderay_css' => 'style' } + }, + 'redcloth' => { + 'hard_breaks' => true } } diff --git a/lib/jekyll/converters/textile.rb b/lib/jekyll/converters/textile.rb index 072e393a..21e1ab49 100644 --- a/lib/jekyll/converters/textile.rb +++ b/lib/jekyll/converters/textile.rb @@ -26,7 +26,11 @@ module Jekyll def convert(content) setup - RedCloth.new(content).to_html + r = RedCloth.new(content) + if !@config['redcloth']['hard_breaks'] + r.hard_breaks = false + end + r.to_html end end