3 ms·
HTML definitely sucks to parse but it's definitely better then plain text. At least it's a standardized format, as well that it allows for a much better interpr
by gauravk92 15y ago
HTML definitely sucks to parse but it's definitely better then plain text. At least it's a standardized format, as well that it allows for a much better interpretation in terms of visuals without convoluting the DOM for a parser. Sort of the best of both worlds, again I know using any HTML lib sucks to a degree, even with xpath, but wouldn't it still be a step forward.
Let's standardize all email error messages to HTML. At least then a standard exists even though it will suck, most standards suck in many ways. But it's a total nightmare without any.
- quanticle 15y agoNo, no, no, a thousand times, no. HTML is not easier to parse than plain text. Plain text is easily transferred, stored, parsed (with grep, or whatever you use for regular expressions), and, as a bonus, is easy for humans to look at. HTML helps with exactly none of those things. There's a reason that Erik S. Raymond emphasizes the power of plain text in The Art of Unix Programming. There's a reason that The Pragmatic Programmer has a chapter devoted to it. That's because plain text (more specifically plain ASCII text) is the closest thing we have to a universally understood format in computing. For something like e-mail, plain text is by far preferable to HTML, XML, JSON or some other structured format. You can't know that your target will have a parser for a structured format. The only thing you can assume is that your target is capable of reading and transferring plain text.
- qznc 15y agoWe could settle with markdown? Does any mail client handle the mime-type text/markdown or text/x-markdown [0] or text/x-web-markdown [1] or something? [0] http://www.mail-archive.com/markdown-discuss@six.pairlist.net/msg00976.html http://www.mail-archive.com/markdown-discuss@six.pairlist.ne... [1] http://codecraft.io/2011/07/18/ubuntu-markdown-files-mime-type-and-association/ http://codecraft.io/2011/07/18/ubuntu-markdown-files-mime-ty...