Ben,
RedCloth is the Ruby library Radiant uses to format Textile. Unfortunately, the latest release 3.0.4 is notoriously awful. The upcoming release, 4.0, adheres to the official Textile 2 reference exactly, including the line breaks you speak of. I recommend you give the pre-release testing gem a try.

 $ gem install RedCloth --source http://code.whytheluckystiff.net

(Note that RedCloth is camel case.) Make sure it's working by opening up irb and typing RedCloth::VERSION and noting the version number is higher than 3.0.4.

That alone probably won't work for your Radiant install because Radiant includes RedCloth in the vendor directory rather than allowing it to be loaded from gems. You either have to remove that directory or, if you're using Radiant in instance mode, add this hack to the environment.rb file after the require 'boot' and before the require 'radius'.

# *** hack to get RedCloth out of vendor ****
$:.reject! {|p| p =~ /vendor\/redcloth/ }

Then check that it's installed properly by starting Radiant's console: ./script/console and typing RedCloth::VERSION.

RedCloth 4.0 will probably be released by May 1.

Jason Garber


On Apr 21, 2008, at 2:37 PM, Ben Morrow wrote:

Sorry if this question doesn't belong here, but I figured one of you
guys might know the answer.

I just set up a fresh 0.66 installation and am using Textile to format
the pages I write.

Everything is working wonderfully except that line breaks do not
generate "<br />" tags. Instead, they simply make a new line in the HTML
code. Example:

Paragraph one.

Paragraph
two.

...should render:
<p>Paragraph one</p>
<p>Paragraph<br />two</p>

...instead, it renders:
<p>Paragraph one</p>
<p>Paragraph
two</p>

Is this a recent change in Textile or something Radiant-specific? On the
"Textile Tryout" page (http://www.textism.com/tools/textile/index.php)
it DOES insert the "<br />" tag. However on the "Textile Reference" page (http://hobix.com/textile/) under "Line Breaks", the author seems to say
that "<br />" is no longer part of the functionality.

Have any of you guys had problems with this?
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to