tecznotes

Michal Migurski's notebook, listening post, and soapbox. Subscribe to this blog. Check out the rest of my site as well.

Oct 23, 2009 9:13am

comments and markdown

The comments on Jeff Atwood's complaint about how site commenters don't read instructions are pretty interesting. Basic gist is that Jeff thinks users are dumb for not understanding how to format their comments according to Markdown rules, while his readers think Jeff is dumb for introducing new rules to a simple text box.

I poked around in the CSS2 spec and found a simple answer, "white-space: pre-wrap;".

This value prevents user agents from collapsing sequences of white space. Lines are broken at newlines in the source, at occurrences of "\A" in generated content, and as necessary to fill line boxes.

That one thing on output plus automatic conversion of URLs into links should make prety much all of Markdown and other similar text-flavoring tricks unnecessary. Indentation, line-breaks, ASCII lists, all that stuff is simply preserved just like it's been in plain old email for a million years. I converted the comments on this page to use it, curious to see if it does the thing.

Comments (10)

  1. Well, let's see if it works: * One * One-and-a-half * Two * Two-and-a-half * e * Three * Pi * Three-and-a-half > Let's pretend we're using a tiny > tiny console and we're quoting > an email. Look out for the grue. Let's see how it goes.

    Posted by Coda Hale on Friday, October 23 2009 11:51am PDT

  2. Well dang. Supported by all major browsers, too.

    Posted by Coda Hale on Friday, October 23 2009 11:52am PDT

  3. Doesn't work in IE6, unfortunately: http://skitch.com/bgreenlee/nrqyw/windows-xp-ie-6-running-sun-virtualbox

    Posted by Brad Greenlee on Friday, October 23 2009 11:57am PDT

  4. MMMMMMMMM XXXX X XXXX XXX XX .X. 'XXX XX XXX.....XXXXX. X XX XX :".. X XX. MXX XXX XX :"" X X XX XX. XX XX X X X XX XX X X .....::::.. .XXXXXX X ..::MMMMMMMM""""MMMMMMM:. I. X X ..::MMMMMM MM MM .. IM MMMI IMMM::..........::MMMMMMMMM MI '' IMM IM IM MMMMM' M""""""MMMMMMM""MMMM MMMI IMMMM MMMM "" MM IMMM M.. ..M MM MMMM MMMMMI IMMMM MMMM :MMM MMMMM MMM MMM MMMM MMMM IMMMI IMMMM MMMM MMMM MMMMI MMM MMM IMM MMMM MMMMMI IMMMM MMMM..MMMM IM IMM MMM MMMM MMMM MMMMMI IMMMMMMMMMMMMMMMMMMMMMM MM MMM MMMM ""IM IMMMMMMMM""X .X X """I MM..MMM MM....IMMMMMMM"" X X XXXXX ""MMMMMMMMMMMMMM"" X X' XX XX X X' XX XX X .X' XX XX X X XX XX XX XX XXX X XX XXX XXX XXX XXX XXXX XXXX "XXXXXXXXX"

    Posted by Sam Quigley on Friday, October 23 2009 11:58am PDT

  5. Or IE7.

    Posted by Brad Greenlee on Friday, October 23 2009 12:00pm PDT

  6. Feh. I guess you'd need a monospace font for that to have worked. Oh well. (That was supposed to have been the Teletype logo, by the way.) -sq

    Posted by Sam Quigley on Friday, October 23 2009 12:00pm PDT

  7. Works in IE8.

    Posted by Brad Greenlee on Friday, October 23 2009 12:01pm PDT

  8. Argh, IE. Always a frustration.

    Posted by Michal Migurski on Friday, October 23 2009 12:18pm PDT

  9. Sam, it looks like a banana holding a large machine gun.

    Posted by Joshua Bloom on Wednesday, October 28 2009 9:52pm PDT

  10. looks pretty crap, even if it is easy.

    Posted by simon on Friday, January 15 2010 8:14am PST

Sorry, no new comments on old posts.

March 2010
Su M Tu W Th F Sa
 
   

Other places on the web I'm enjoying: Andrew Vande Moere's Information Aesthetics, Jan Chipchase's Future Perfect, Peacay's Bibliodyssey, Eyebeam's Reblog, The Sartorialist, Processing Blogs, Matthew Hurst's Data Mining, Wondermark, Photos tagged Wroclaw, and The Beautiful Poland Pool.

Friends (who have websites): Abe, Adam, another Adam, Andrew, Andy, Boris, Cassidy, Darren, Eric, Mike, Nikki, Otherworld, Peter, Ryan, Tomas, Tom, Thomas.

Recent Entries

  1. sxsw 2010-bound
  2. walking papers plug
  3. punversation
  4. user research friday
  5. zoom transitions
  6. commute cinema
  7. the hose drawer
  8. last week: new york
  9. next week: new york
  10. blog all oft-played tracks

Archives