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 -- Posted via http://www.ruby-forum.com/.
Dan, I haven''t scrubbed the code to see why but I know if I neglect to p<hut a 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 document. I''ve observed this behavior at least back to 4.2.2 and found it to apply as well to other alphadot* *constructions (like* p.*). Rick On Sun, May 8, 2011 at 2:27 PM, Dan Lamet <lists at ruby-forum.com> wrote:> 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 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/redcloth-upwards/attachments/20110508/935ac198/attachment.html>
Sorry, I set before I finished. The right way appears to be: BLANK LINE h4. **Section Title** BLANK LINE 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 is needed, only a single newline. BLANK LINE p. Lots and lots (many lines) of text. The paragraph will only end with the first newline. Hope that helps. On Sun, May 8, 2011 at 3:46 PM, Richard Lloyd <richard.t.lloyd at gmail.com>wrote:> Dan, > > I haven''t scrubbed the code to see why but I know if I neglect to p<hut a > 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 > document. > > I''ve observed this behavior at least back to 4.2.2 and found it to apply as > well to other alphadot* *constructions (like* p.*). > > Rick > > On Sun, May 8, 2011 at 2:27 PM, Dan Lamet <lists at ruby-forum.com> wrote: > >> 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 >> >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Redcloth-upwards mailing list >> Redcloth-upwards at rubyforge.org >> http://rubyforge.org/mailman/listinfo/redcloth-upwards >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/redcloth-upwards/attachments/20110508/dc38589d/attachment-0001.html>
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 and 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’s all. Thank you.</p> ~ $ You can send an EOF (which it waits for to send the output) by pressing ^D (^Z on Windows) I''m working on a rewrite of RedCloth and as part of that I will have a form to fill out to provide an example when making a bug report. Expect great things soon! Jason On Sun, May 8, 2011 at 1:57 PM, Richard Lloyd <richard.t.lloyd at gmail.com>wrote:> Sorry, I set before I finished. > > The right way appears to be: > > BLANK LINE > h4. **Section Title** > BLANK LINE > > 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 is > needed, only a single newline. > > BLANK LINE > p. Lots and lots (many lines) of text. The paragraph will only end with > the first newline. > > Hope that helps. > > On Sun, May 8, 2011 at 3:46 PM, Richard Lloyd <richard.t.lloyd at gmail.com>wrote: > >> Dan, >> >> I haven''t scrubbed the code to see why but I know if I neglect to p<hut a >> 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 >> document. >> >> I''ve observed this behavior at least back to 4.2.2 and found it to apply >> as well to other alphadot* *constructions (like* p.*). >> >> Rick >> >> On Sun, May 8, 2011 at 2:27 PM, Dan Lamet <lists at ruby-forum.com> wrote: >> >>> 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 >>> >>> -- >>> Posted via http://www.ruby-forum.com/. >>> _______________________________________________ >>> Redcloth-upwards mailing list >>> Redcloth-upwards at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/redcloth-upwards >>> >> >> > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/redcloth-upwards/attachments/20110510/3288bcfc/attachment.html>
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 digibunker.com. It''s only on my rebuilt RoR 3.x app that it fails. Thanks, Dan Attachments: http://www.ruby-forum.com/attachment/6194/DigiBunker_FAQ.txt -- Posted via http://www.ruby-forum.com/.
Thanks for sending over the file. Why is everything indented? Somehow, it 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 server,> 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’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, > 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’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 Digibunker.com any time you want. You can see the date they were save and> they are categorized by file type.h4. <b>Can I retrieve single files?</b> Yes, DigiBunker is a digital media file backup service that’s here for> 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. <b>What do I do if I lose my digital files I have at DigiBunker?</b> 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. <b>How long will you save my files?</b> DigiBunker will save your files for 5 years from the date you chose to save> 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 … DigiBunker will not observe your files> 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 On Thu, May 12, 2011 at 3:01 PM, Dan Lamet <lists at ruby-forum.com> wrote:> 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 digibunker.com. It''s > only on my rebuilt RoR 3.x app that it fails. > > Thanks, Dan > > Attachments: > http://www.ruby-forum.com/attachment/6194/DigiBunker_FAQ.txt > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/redcloth-upwards/attachments/20110513/66797eb0/attachment.html>