Forum: Redcloth Selective RedCoth Failure

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Dan L. (Guest)
on 2011-05-08 22:27
I have a couple of apps in which I've used RedCloth for a number of
years.  I'm in the process of upgrading those apps to Rails 3 & RedCloth
4.2.7.  I'm getting a condition where certain tags are converted and
others ignored.  Take the following snippet as an example:

    h4. **Section Title**

    Some body text

That now converts to

h4. <b>Section Title</b>
Some body text

The bold is recognized and converted, but the header is ignored, and the
line break is not inserted.  How is this possible?

Thanks, Dan
Rick L. (Guest)
on 2011-05-09 00:00
(Received via mailing list)

I haven't scrubbed the code to see why but I know if I neglect to p<hut
blank line in before the *h4.* it will not be converted to
*<h4>...</h4>* in
the template an will instead be passed through as plain text to the

I've observed this behavior at least back to 4.2.2 and found it to apply
well to other alphadot* *constructions (like* p.*).

Rick L. (Guest)
on 2011-05-09 00:15
(Received via mailing list)
Sorry, I set before I finished.

The right way appears to be:

h4. **Section Title**

Failure to end this construction with a blank line will cause whatever
following text (up to the next blank line) to be included in the *
<h4>...</h4>* construction in the template.

This behaviour differs from the paragraph formatting where no blank line
needed, only a single newline.

p. Lots and lots (many lines) of text.  The paragraph will only end with
first newline.

Hope that helps.
Jason G. (Guest)
on 2011-05-10 18:07
(Received via mailing list)
Sorry, I'm not able to follow your examples. Would you mind putting the
input in text files and attaching them. Hopefully that will work. You're
also welcome to use the redcloth command line tool and copy the input
output like so:

~ $ redcloth
This is a test of the h4:

h4. Lorem ipsum dolor sit amet

That's all. Thank you.
<p>This is a test of the h4:</p>
<h4>Lorem ipsum dolor sit amet</h4>
<p>That&#8217;s all. Thank you.</p>
~ $

You can send an EOF (which it waits for to send the output) by pressing
(^Z on Windows)

I'm working on a rewrite of RedCloth and as part of that I will have a
to fill out to provide an example when making a bug report. Expect great
things soon!

Dan L. (Guest)
on 2011-05-13 01:01
Attachment: DigiBunker_FAQ.txt (0 Bytes)
Sorry for the delay.  I was out sick.

Here's the source file as requested.  Note that this file worked fine,
and still does so on my posted RoR 2.x site at  It's
only on my rebuilt RoR 3.x app that it fails.

Thanks, Dan
Jason G. (Guest)
on 2011-05-13 18:16
(Received via mailing list)
Thanks for sending over the file. Why is everything indented? Somehow,
still works. The output looks just fine to me on RedCloth 4.2.7

h4. <b>What is DigiBunker?</b>

DigiBunker is so simple and saves your files on a secure and private
> meaning you get protection from hard drive failure, theft or property
> catastrophe.

h4. <b>How does DigiBunker save me money?</b>

We save you money by restoring your lost digital media at a minimal
cost. If
> you&#8217;ve invested hundreds or thousands of dollars on your digital media
> library, you wouldn&#8217;t want to have to spend the same amount of money
> to replace those files would you? Lets suppose you have a music library of
> about 500 songs, if you lost all of those songs, it would cost you $500 to
> replace them. DigiBunker will replace your songs for pennies on the dollar,
> literally.

 h4. <b>How does your service work?</b>

Our service offers you a program that identifies when you download a new
> music, movie, or video game, and will ask you if you want to pay to save the
> file from loss. You can also set our service to automatically back up all
> your digital media downloads to your computer without disrupting your
> computer use or system.

 h4. <b>How much does DigiBunker cost?</b>

DigiBunker cost pennies, literally! Our services are offered at a price
> that&#8217;s very affordable to you. Once you open an account, you choose
> how much to spend and what files you want to pay to save. There are no
> monthly fees, you can start your account with only a $10.00 minimum starting
> account balance. DigiBunker automatically Calculates your exact amount of
> media files you have to store and gives you the full price to store them.
> The cost is $.01 cents per music file and $1.00 per movie and video game and
> your photos are free up to 2GB.

 h4. <b>Can I view my saved files?</b>

Yes, you can see your saved files at any time you want. You can see the date they were save
> they are categorized by file type.

h4. <b>Can I retrieve single files?</b>

Yes, DigiBunker is a digital media file backup service that&#8217;s here
> you if you experience an extreme computer loss, such as a hard drive crash,
> theft or catastrophe. Think of as your guardian angel, you might need us for
> the small stuff, and we&#8217;ve definitely got your back when you really
> need a helping hand to replace your lost files.

 h4. <b>What do I do if I lose my digital files I have at

It&#8217;s simple, you file a claim, pay a small processing fee and once
> we&#8217;ve received your request, you can select how you want to retrieve
> your files. You can retrieve them via download to your computer, or we will
> send you an external device to restore your files, which you simply return
> back to us once your finished re-installing your lost files.

 h4. <b>How long will you save my files?</b>

DigiBunker will save your files for 5 years from the date you chose to
> the file with us. You must renew your account every 5 years with a small
> renewal fee. You can also cancel your account at any time.

h4. <b>Are all my saved files private?</b>

Yes your files are private &#8230; DigiBunker will not observe your
> and we will never share your saved file information with any third party
> organization <span class="caps">PERIOD</span>.

 ~ $ redcloth --version

RedCloth 4.2.7
This topic is locked and can not be replied to.