CodeJOAT: Thirty years of being an IT dogsbody

Added Posts to home page as entries stored in a database


Thursday, April 24, 2008

I have moved forward a bit, by adding Posts as a RoR Model, stored on a database. No maintenance pages yet, but I am using the RedCloth gem to render content stored as markup into HTML.

There is a bit of discussion going on in the RedCloth and SuperRedCloth camps, dealing with how line breaks in the markup are to be treated. Some markup systems treat a series of lines with single linebreaks as a paragraph, and rely on double line breaks to separate paragraphs. Some people like this, while others feel that when people put line breaks into their markup, it means they want some kind of break there. So what does this mean and where should breaks occur? From one way of looking this is a single paragraph; from another this is some kind of structured text:

Contact Info:
George Washington
Mt. Vernon, VA
Telephones haven’t been invented yet.
What’s an email address?

what about:

I hate long lines in my editor, which
is pretty stupid and does not
support soft line wrapping. That’s
why I like markup that treats this as
a single paragraph.

The RedCloth gem allows the user to choose the desired behavior, but SuperRedCloth does not appear to. (At least not right now!) I’ll go with RedCloth and follow the blogs on SuperRedCloth.

Until next time,

Tom Porter

tomporter@codejoat.com