Selective RedCoth Failure

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. Section Title
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

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 *


* 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.


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

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.*).


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.

This is a test of the h4:

Lorem ipsum dolor sit amet

That’s all. Thank you.

~ $

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!


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

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. What is DigiBunker?

DigiBunker is so simple and saves your files on a secure and private

meaning you get protection from hard drive failure, theft or property

h4. How does DigiBunker save me money?

We save you money by restoring your lost digital media at a minimal
cost. If

you’ve invested hundreds or thousands of dollars on your digital media
library, you wouldn’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,

h4. How does your service work?

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. How much does DigiBunker cost?

DigiBunker cost pennies, literally! Our services are offered at a price

that’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. Can I view my saved files?

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. Can I retrieve single files?

Yes, DigiBunker is a digital media file backup service that’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’ve definitely got your back when you really
need a helping hand to replace your lost files.

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

It’s simple, you file a claim, pay a small processing fee and once

we’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. How long will you save my files?

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. Are all my saved files private?

Yes your files are private … DigiBunker will not observe your

and we will never share your saved file information with any third party
organization PERIOD.

~ $ redcloth --version

RedCloth 4.2.7

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs