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 4: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 6:51pm UTC

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

    Posted by Coda Hale on Friday, October 23 2009 6:52pm UTC

  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 6:57pm UTC

  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 6:58pm UTC

  5. Or IE7.

    Posted by Brad Greenlee on Friday, October 23 2009 7:00pm UTC

  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 7:00pm UTC

  7. Works in IE8.

    Posted by Brad Greenlee on Friday, October 23 2009 7:01pm UTC

  8. Argh, IE. Always a frustration.

    Posted by Michal Migurski on Friday, October 23 2009 7:18pm UTC

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

    Posted by Joshua Bloom on Thursday, October 29 2009 4:52am UTC

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

    Posted by simon on Friday, January 15 2010 4:14pm UTC

Sorry, no new comments on old posts.

November 2018
Su M Tu W Th F Sa
    
 

Recent Entries

  1. How It’s Made: A PlanScore Predictive Model for Partisan Elections
  2. Micromobility Data Policies: A Survey of City Needs
  3. Open Precinct Data
  4. Scoring Pennsylvania
  5. Coming To A Street Near You: Help Remix Create a New Tool for Street Designers
  6. planscore: a project to score gerrymandered district plans
  7. blog all dog-eared pages: human transit
  8. the levity of serverlessness
  9. three open data projects: openstreetmap, openaddresses, and who’s on first
  10. building up redistricting data for North Carolina
  11. district plans by the hundredweight
  12. baby steps towards measuring the efficiency gap
  13. things I’ve recently learned about legislative redistricting
  14. oh no
  15. landsat satellite imagery is easy to use
  16. openstreetmap: robots, crisis, and craft mappers
  17. quoted in the news
  18. dockering address data
  19. blog all dog-eared pages: the best and the brightest
  20. five-minute geocoder for openaddresses

Archives