Random Etc. Notes to self. Work, play, and the rest.

Testing Posting Code

Just wondering how the <code> tag works in html with Blogger.

// nothing to see here, just pretending that I've posted some code

for (int i = 0; i println("nothing to see here");
}

Does that work? Who knows? I bet it breaks Processing Blogs, but then so does posting images to this blog, for some reason. What's a blogger to do?

on edit: surprisingly seems to work as long as you stay in "edit html" and don't flick into compose or preview. Seems well padded with this style sheet though, so no need for leading or trailing line breaks in the code.

on second edit: Oh, and indenting doesn't show up, but at least it wraps long lines. Can't ask for everything!

on aggregation: Seems I was right - though it works on the page itself, it doesn't seem to get picked up by Bloglines or my Processing Blogs aggregator. Looks like it's missing from the atom feed entirely... I think I'll post a bug.


4 Comments

Hey Tom, I don’t know if it’s down to the WordPress aggregator, but there’s definitely something dodgy with the Atom parser on ProcessingBlogs. For example, all links of my aggregated blog posts don’t seem to work on your site and are totally missing from the resulting RSS. Looking at the HTML source all <a href=”"> are replaced by simple <a>’s…

Posted by toxi on 9 July 2006 @ 11am

Yeah, you’re right. I had a similar problem with image tags. I’ll see if there’s an update to to plug-in later today.In this case though, the code tags are missing from Blogger’s xml all together, so it’s not a problem at this end.

Posted by Tom Carden on 9 July 2006 @ 12pm

can’t you just use <pre> instead of <code>? that’s how i always do it and blogger seems to like that… ;)

Posted by toxi on 9 July 2006 @ 2pm

I had other issues with pre, that’s why I was trying code.But Bloglines seems to have picked it up now, which is confusing me no end…I’ll ping Processing Blogs again and see what happens.

Posted by Tom Carden on 9 July 2006 @ 3pm