This is Shadow2531's Typepad Profile.
Join Typepad and start following Shadow2531's activity
Join Now!
Already a member? Sign In
Recent Activity
"You should have to do 2..." Shouldn't I mean.
Toggle Commented Nov 7, 2012 on The Future of Markdown at Coding Horror
I hate that markdown doesn't do bold, italics and underlining this way: *bold* /italics/ _underline_ where you escape *, / and _ with \ if you don't want styling. That's how it should be as it matches text/plain email composition style. You should have to do 2 ** before and after to get bold.
Toggle Commented Nov 7, 2012 on The Future of Markdown at Coding Horror
There's a common and accepted way to normalize newlines (using js regex for examples): .replace(/\r\n|\r/g, "\n"); .replace(/\r\n|\r|\n/g, "\r\n"); .replace(/\r\n|\n/g, "\r"); The first method is used for server-sent events (not regex, but the normalizing of \r\n and \r to \n via parsing). The second method is used in HTML5 for textarea value getters/setters. Opera does this already. However, Webkit currently uses the first method and Gecko and IE do different things depending on the situation. You can use __lookupGetter/Setter__ and __defineGetter/Setter__ or Object.getOwnPropertyDescriptor and Object.defineProperty to patch a textarea's 'value' getter and setter to work around the differences in newline normalization. Newlines being right for a textarea's value is important because it affects the value's length, which many sites (like Twitter) use as character counters to enforce limits. I absolutely hate the newline deal though. I wish we could get rid of it and just use only \n everywhere. As for a Unicode newline, I once tried to switch to using it (just to be Unicode-proper and all that), but couldn't find anything that handled it display-wise.
Toggle Commented Feb 16, 2010 on The Great Newline Schism at Coding Horror
Shadow2531 is now following The Typepad Team
Feb 16, 2010