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 12:13pm

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 2:51pm EDT

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

    Posted by Coda Hale on Friday, October 23 2009 2:52pm EDT

  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 2:57pm EDT

  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 2:58pm EDT

  5. Or IE7.

    Posted by Brad Greenlee on Friday, October 23 2009 3:00pm EDT

  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 3:00pm EDT

  7. Works in IE8.

    Posted by Brad Greenlee on Friday, October 23 2009 3:01pm EDT

  8. Argh, IE. Always a frustration.

    Posted by Michal Migurski on Friday, October 23 2009 3:18pm EDT

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

    Posted by Joshua Bloom on Thursday, October 29 2009 12:52am EDT

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

    Posted by simon on Friday, January 15 2010 11:14am EST

Sorry, no new comments on old posts.

October 2017
Su M Tu W Th F Sa
    

Recent Entries

  1. planscore: a project to score gerrymandered district plans
  2. blog all dog-eared pages: human transit
  3. the levity of serverlessness
  4. three open data projects: openstreetmap, openaddresses, and who’s on first
  5. building up redistricting data for North Carolina
  6. district plans by the hundredweight
  7. baby steps towards measuring the efficiency gap
  8. things I’ve recently learned about legislative redistricting
  9. oh no
  10. landsat satellite imagery is easy to use
  11. openstreetmap: robots, crisis, and craft mappers
  12. quoted in the news
  13. dockering address data
  14. blog all dog-eared pages: the best and the brightest
  15. five-minute geocoder for openaddresses
  16. notes on debian packaging for ubuntu
  17. guyana trip report
  18. openaddresses population comparison
  19. blog all oft-played tracks VII
  20. week 1,984: back to the map

Archives