# RedCloth formatting issues

**URL:** <https://www.ruby-forum.com/t/redcloth-formatting-issues/119921>\
**Category:** Rails\
**Created:** [November 12, 2007, 9:12am UTC](https://www.ruby-forum.com/t/redcloth-formatting-issues/119921 "2007-11-12T09:12:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgudibanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Post date:** [November 12, 2007, 9:12am UTC](https://www.ruby-forum.com/t/redcloth-formatting-issues/119921/1 "2007-11-12T09:12:05Z")

</div>

Hi,

I am using Rails 1.2.3 and RedCloth-3.0.3.

I am using redcloth to format user enter text to html: textilize(@text).  
I have these issues:

1. Cannot leave spaces in front of a new line: I mean if i try something  
like this:

Case a) Input:  
Few spaces before this line

```
    Output:

```

Few spaces before this line

spaces are removed

Case b) Input

Normal first line

```
 Second line has few spaces in front

   Output:

```

Normal first line

Second line has few spaces in front (In a smaller font)

Any suggestions?

Regards,  
Sandeep G

---

<div class="post-metadata">

**Author:** ![sgudibanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Post date:** [November 12, 2007, 9:22am UTC](https://www.ruby-forum.com/t/redcloth-formatting-issues/119921/2 "2007-11-12T09:22:48Z")

</div>

Redcloth is poop. I have a prefrence for textile but switched to  
markdown as redcloth had so many problems.  
Check out Blucloth gem

---

<div class="post-metadata">

**Author:** ![sgudibanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Post date:** [November 12, 2007, 9:30am UTC](https://www.ruby-forum.com/t/redcloth-formatting-issues/119921/3 "2007-11-12T09:30:59Z")

</div>

Hi,

2007/11/12, Sandeep G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> 1. Cannot leave spaces in front of a new line

Take a look at the textile quick reference  
[http://hobix.com/textile/quick.html](http://hobix.com/textile/quick.html). You can use

p((. left ident 2em

to indent a line.

Lutz

---

<div class="post-metadata">

**Author:** ![sgudibanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Post date:** [November 12, 2007, 9:58am UTC](https://www.ruby-forum.com/t/redcloth-formatting-issues/119921/4 "2007-11-12T09:58:28Z")

</div>

Adam J. wrote:

> Redcloth is poop. I have a prefrence for textile but switched to  
> markdown as redcloth had so many problems.  
> Check out Blucloth gem

Hi Adam,

Is Bluecloth working fine for you. Heard bluecloth is 20% more slower  
and crashes at times? Have u faced any?

Regards,  
Sandeep G

---

<div class="post-metadata">

**Author:** ![sgudibanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Post date:** [November 12, 2007, 9:57am UTC](https://www.ruby-forum.com/t/redcloth-formatting-issues/119921/5 "2007-11-12T09:57:28Z")

</div>

Lutz H. wrote:

> Hi,
> 
> 2007/11/12, Sandeep G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > 1. Cannot leave spaces in front of a new line
> 
> Take a look at the textile quick reference  
> [http://hobix.com/textile/quick.html](http://hobix.com/textile/quick.html). You can use
> 
> p((. left ident 2em
> 
> to indent a line.
> 
> Lutz

Thanks for the input.  
But I don’t want users to force the identation. When users type in the  
text\_field, if they ident with spaces, I should be able to display the  
same way.

In fact , I am storing user entered text in DB. In DB i have the  
identation intact. Only when i display with redcloth, it gets bad …

Any suggestion here?

Sandeep G
