Friday, May 21, 2010

Missing line returns and trailing spaces

You can skip this step if you are using a Full or Jump-Break feed or if all you are publishing is a list of post titles.

Otherwise:

Your thirst to present your blog content in chronological order has led you to publish a feed of your blog and run it through a pipe, then make a second feed from that and convert it to a script that you publish on your blog.

Probably you've even taken the next step of using CSS to format the way your blog presents the feed. (If not you can do that next--or go back and do it right now.)

Congratulations!

But, are you happy?

If you take the time to proofread the final result, I hope you will be pleased. At last, you can relive the journey that your blog has been for you--and share it with your readers.

However, if your feed is set to Short, you might also find some anomalies and typos that you can only fix by editing your pipe or your blog.

The original Short feed simplified and de-formatted your blog. All hyperlinks were stripped away, and all formatting, and all line returns. If you had written,
Welcome to my blog!
Please stop and smell the javascript.
Your feed would render that as
Welcome to my blog!Please stop and smell the javascript.
without even the grace of a space between ! and P.

Your pipe does not restore hyperlinks, and formatting is a job for CSS. But the pipe is designed to put those returns back where they were. If you had photos in your posts, it will even put some of them back as thumbnails.

(More on Short versus Full here.)

If the pipe does not do a perfect job of restoring the returns, there are two steps you can take. The simplest is to edit your original blog posts to remove trailing spaces from paragraphs.

If, for instance, in the example above, you had typed a space after "Welcome to my blog! ", the space would show up in your feed as follows:
Welcome to my blog! Please stop and smell the javascript.
Ironically, without the inappropriate "blog!Please" text string, your pipe has no way to identify the place to add line returns back in.

If you see paragraphs all jammed together in your feed, the first and simplest thing to do is to open the original post for editing and delete the trailing spaces.

Once the changes you have made make their way through the pipe and back to your blog--which can take an hour or so--the returns should be back where they belong.

Or, maybe not all of them. That curious matter is dealt with in the next section (or two).

No comments:

Post a Comment