# Redcloth

**URL:** <https://www.ruby-forum.com/t/redcloth/65308>\
**Category:** Radiant CMS\
**Created:** [August 17, 2006, 2:11pm UTC](https://www.ruby-forum.com/t/redcloth/65308 "2006-08-17T14:11:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 17, 2006, 2:11pm UTC](https://www.ruby-forum.com/t/redcloth/65308/1 "2006-08-17T14:11:48Z")

</div>

As far as I can tell, Radiant seems to have the line break bug in  
Redcloth. Is this true? Can it be fixed?

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 17, 2006, 3:27pm UTC](https://www.ruby-forum.com/t/redcloth/65308/2 "2006-08-17T15:27:56Z")

</div>

Keith B. wrote:

> As far as I can tell, Radiant seems to have the line break bug in  
> Redcloth. Is this true? Can it be fixed?

After googling (like I should have done in the first place) I see that  
-why has made it like this on purpose, unlike the textile I am used to.  
Turning hard breaks on, at least as far as I can tell, makes everything  
one big paragraph, with breaks in between. I need blocks of paragraphs,  
with line breaks. I got it to work in Markdown, but one really prefer  
Textile.

I know this has been a probem in Rails generally, but never have  
personally found a good solution.

Any ideas?

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 17, 2006, 4:17pm UTC](https://www.ruby-forum.com/t/redcloth/65308/3 "2006-08-17T16:17:23Z")

</div>

Keith B. wrote:

> After googling (like I should have done in the first place) I see that  
> -why has made it like this on purpose, unlike the textile I am used to.  
> Turning hard breaks on, at least as far as I can tell, makes everything  
> one big paragraph, with breaks in between. I need blocks of paragraphs,  
> with line breaks. I got it to work in Markdown, but one really prefer  
> Textile.
> 
> I know this has been a probem in Rails generally, but never have  
> personally found a good solution.

Could you give me an example of text that is being interpreted  
incorrectly and the output?

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 17, 2006, 4:43pm UTC](https://www.ruby-forum.com/t/redcloth/65308/4 "2006-08-17T16:43:13Z")

</div>

John W. Long wrote:

> Could you give me an example of text that is being interpreted  
> incorrectly and the output?

John,

the text is very simple, just a list that should be given out as a  
block:

MI 31.08. digi lounging  
DO 01.09. rive gauche opening party  
FR 02.09. csaba, crying soul production  
SA 03.09. l'un est l'autre, deep'n sexy house

In Textile, it isn’t recognizing the breaks, as is usually the case with  
(non-Rails) Textile. It comes out like this:

MI 31.08. digi lounging DO 01.09. rive gauche opening party FR 02.09. csaba, crying soul production SA 03.09. l'un est l'autre, deep'n sexy house

This is an on going problem in Rails, I have read about it before, but  
rarely used Textile in a rails setting. I tried switching to hard breaks  
and and while it did give me the break elements, it did give any p  
elements, except for one big one around the text.

Does that make sense?

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 17, 2006, 5:02pm UTC](https://www.ruby-forum.com/t/redcloth/65308/5 "2006-08-17T17:02:32Z")

</div>

Keith B. wrote:

> Does that make sense?

So to clarify, you give it the following:

MI 31.08. digi lounging  
DO 01.09. rive gauche opening party  
FR 02.09. csaba, crying soul production  
SA 03.09. l’un est l’autre, deep’n sexy house

And expect:

MI 31.08. digi lounging  
 DO 01.09. rive gauche opening party  
 FR 02.09. csaba, crying soul production  
 SA 03.09. l'un est l'autre, deep'n sexy house

But instead get:

MI 31.08. digi lounging DO 01.09. rive gauche opening party FR 02.09. csaba, crying soul production SA 03.09. l'un est l'autre, deep'n sexy house

?

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 17, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/redcloth/65308/6 "2006-08-17T18:59:05Z")

</div>

John W. Long wrote:

> Keith B. wrote:
> 
> > Does that make sense?
> 
> So to clarify, you give it the following:
> 
> MI 31.08. digi lounging  
> DO 01.09. rive gauche opening party  
> FR 02.09. csaba, crying soul production  
> SA 03.09. l’un est l’autre, deep’n sexy house
> 
> And expect:
> 
> MI 31.08. digi lounging  
> DO 01.09. rive gauche opening party  
> FR 02.09. csaba, crying soul production  
> SA 03.09. l'un est l'autre, deep'n sexy house
> 
> But instead get:
> 
> MI 31.08. digi lounging DO 01.09. rive gauche opening party FR 02.09. csaba, crying soul production SA 03.09. l'un est l'autre, deep'n sexy house
> 
> ?
> 
> –  
> John L.  
> [http://wiseheartdesign.com](http://wiseheartdesign.com)

Yes, this is how it usually works in Textile, at least in Textpattern.  
As Dean Allen wrote both, one would expect that that is the way it was  
inteneded to work.

\_why seems to have other feelings, but this is how it would ideally work  
for me.

Keith B.

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 18, 2006, 9:42am UTC](https://www.ruby-forum.com/t/redcloth/65308/7 "2006-08-18T09:42:07Z")

</div>

John W. Long wrote:

> Keith B. wrote:
> 
> > \_why seems to have other feelings, but this is how it would ideally work  
> > for me.
> 
> Could you point me to a url about this?
> 
> –  
> John L.  
> [http://wiseheartdesign.com](http://wiseheartdesign.com)

I meant to include this, but forgot:

[http://redhanded.hobix.com/inspect/usingRedcloth3.html](http://redhanded.hobix.com/inspect/usingRedcloth3.html)

He states that you can switch hard breaks on, but when I try this, it  
disables paragraphs. Oh well…

Keith BIngman

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 18, 2006, 5:34am UTC](https://www.ruby-forum.com/t/redcloth/65308/8 "2006-08-18T05:34:25Z")

</div>

Keith B. wrote:

> \_why seems to have other feelings, but this is how it would ideally work  
> for me.

Could you point me to a url about this?

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 18, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/redcloth/65308/9 "2006-08-18T19:10:48Z")

</div>

John W. Long wrote:

> Keith B. wrote:
> 
> > I meant to include this, but forgot:
> > 
> > [http://redhanded.hobix.com/inspect/usingRedcloth3.html](http://redhanded.hobix.com/inspect/usingRedcloth3.html)
> > 
> > He states that you can switch hard breaks on, but when I try this, it  
> > disables paragraphs. Oh well…
> 
> I think I’m going to side with \_why for now. In the meantime you can  
> just use   
> tags between lines.
> 
> –  
> John L.  
> [http://wiseheartdesign.com](http://wiseheartdesign.com)

I assumed this one be the response. Unfortunately, this is not a site  
for me… one of the pesky customers who doesn’t want to learn…! I  
have a solution though. Thanks for looking into it.

Keith B.

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 18, 2006, 3:14pm UTC](https://www.ruby-forum.com/t/redcloth/65308/10 "2006-08-18T15:14:27Z")

</div>

Keith B. wrote:

> I meant to include this, but forgot:
> 
> [http://redhanded.hobix.com/inspect/usingRedcloth3.html](http://redhanded.hobix.com/inspect/usingRedcloth3.html)
> 
> He states that you can switch hard breaks on, but when I try this, it  
> disables paragraphs. Oh well…

I think I’m going to side with \_why for now. In the meantime you can  
just use   
 tags between lines.

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 18, 2006, 8:54pm UTC](https://www.ruby-forum.com/t/redcloth/65308/11 "2006-08-18T20:54:14Z")

</div>

RedCloth is focused on Textile formatting (with Markdown practically  
as an aside).

I suggest using BlueCloth for Markdown:  
[dev(E)iate](http://www.deveiate.org/projects/BlueCloth)

In my experience, it works much better, including a fix for this line  
break problem:

Two spaces at the end of a line create a   
,  
otherwise single carriage returns are ignored.

Two carriage returns still delimit paragraphs.

\*Mars

On Aug 17, 2006, at 07:11, Keith B. wrote:

> As far as I can tell, Radiant seems to have the line break bug in  
> Redcloth. Is this true? Can it be fixed?
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Radiant mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

( \<\> … \<\> )

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 18, 2006, 9:27pm UTC](https://www.ruby-forum.com/t/redcloth/65308/12 "2006-08-18T21:27:17Z")

</div>

MarsHall wrote:

> RedCloth is focused on Textile formatting (with Markdown practically  
> as an aside).
> 
> I suggest using BlueCloth for Markdown:  
> [dev(E)iate](http://www.deveiate.org/projects/BlueCloth)

Radiant does use BlueCloth for Markdown. We were discussing some  
differences between the way RedCloth formats Textile and the way it  
works with the original Textile library.

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [August 22, 2006, 6:00pm UTC](https://www.ruby-forum.com/t/redcloth/65308/13 "2006-08-22T18:00:43Z")

</div>

John W. Long wrote:

> Keith B. wrote:
> 
> > I meant to include this, but forgot:
> > 
> > [http://redhanded.hobix.com/inspect/usingRedcloth3.html](http://redhanded.hobix.com/inspect/usingRedcloth3.html)
> > 
> > He states that you can switch hard breaks on, but when I try  
> > this, it disables paragraphs. Oh well…
> 
> I think I’m going to side with \_why for now. In the meantime  
> you can just use   
> tags between lines.

You can also insert one (or more) spaces right before the  
newline. RedCloth will convert /\s+$/ to a   
. This is  
also ``standard’’ Textile. Try it out:

[Textism: Tools: Textile](http://textism.com/tools/textile/)

-Drew
