{"id":133,"date":"2005-11-21T18:29:44","date_gmt":"2005-11-21T08:29:44","guid":{"rendered":"http:\/\/www.somethinkodd.com\/oddthinking\/?p=133"},"modified":"2007-09-10T18:33:28","modified_gmt":"2007-09-10T08:33:28","slug":"markdown-is-dead-long-live-markdown","status":"publish","type":"post","link":"https:\/\/www.somethinkodd.com\/oddthinking\/2005\/11\/21\/markdown-is-dead-long-live-markdown\/","title":{"rendered":"MarkDown is Dead! Long Live MarkDown!"},"content":{"rendered":"<p>I have just decommissioned <a href=\"http:\/\/www.michelf.com\/projects\/php-markdown\/\">PHP Markdown<\/a>. It is no longer running at OddThinking.<\/p>\n<h2>Why MarkDown is Great<\/h2>\n<p>MarkDown is a cool plug-in to WordPress which allows you to markup your text with a different set of &#8220;tags&#8221; to HTML. It automatically turns the text into HTML as it generates the page.<\/p>\n<p>MarkDown&#8217;s philosophy is to make it easier to indicate the desired fonts by making the plain-text look like the formatted text. For example, if you want to emphasize some text, you *write like this!* Want to make it stronger? **Write like this!**<\/p>\n<p>This technique is fairly successful at allowing natural entry of markup (especially for bullet points, which are <em>so<\/em> much easier to get right in MarkDown than HTML).<\/p>\n<h2>Why MarkDown is Not So Great<\/h2>\n<p>There are a number of small reasons why I didn&#8217;t like MarkDown. None of them are show-stoppers by themselves, but as a group they led me to back away from it.<\/p>\n<h3>Basic Premise Not Required<\/h3>\n<p>If you need to be able to read a page in both plain-text and in formatted text, MarkDown is great. It is a far more human-readable markup language than HTML, LaTeX, etc.<\/p>\n<p>However, I simply don&#8217;t have that need on a blog. I don&#8217;t care if the plain text version is ugly; no-one but me needs to read it, and I am technically adept enough to sift through HTML tags (or else I want to see the final formatted version.)<\/p>\n<p>So I don&#8217;t value the premise behind the&nbsp;key design decision for MarkDown.<\/p>\n<h3>At the Wrong Architectural Level<\/h3>\n<p>WordPress has a repository of posts and comment content. This content is used by a number of different components. They have an implicit assumption that the encoding of the content is in HTML.<\/p>\n<p>One of the components is the WordPress comment editor. Another is the engine that renders the page when it sees a <code>the_content()<\/code> tag. These two components are modified by the MarkDown plugin to handle the new markup language.<\/p>\n<p>However, there are several other components using the same repository. Those components are still expecting the format of the content to be HTML. When MarkDown breaks that assumption, these other components appear to be faulty. MarkDown does not play well with others.<\/p>\n<p>Some examples include:<\/p>\n<ul>\n<li>WordPress&#8217;s <code>allowed_tags()<\/code> tag. (Comment authors are not informed that MarkDown is available.)<\/li>\n<li><a href=\"http:\/\/dev.wp-plugins.org\/wiki\/LiveCommentPreview\">Live Comment Preview<\/a>&nbsp;(Comment authors do not see the results of the MarkDown tags until they hit submit.)<\/li>\n<li><a href=\"http:\/\/semagic.sourceforge.net\/\">Semagic<\/a>&nbsp;(Can&#8217;t preview MarkDown tags.)<\/li>\n<li>Textile (Another markup language which has similar issues)<\/li>\n<li>EmailShroud 1.0.0 (Issue was fixed in <a href=\"http:\/\/www.somethinkodd.com\/oddthinking\/emailshroud-wordpress-plugin\/\">EmailShroud 1.0.1<\/a>)<\/li>\n<\/ul>\n<\/p>\n<p>To correct these issues, I think that MarkDown belongs a layer above where it sits now. It should generate XHTML output, and store that (with additional XML tags as required) in the database (rather than doing it just-in-time generation of XHTML). That way&nbsp;other tools can manipulate the text appropriately. There may be other architectural reasons why this approach may not work.<\/p>\n<h3>Coming Down from MarkDown<\/h3>\n<p>Moving from HTML blog entries to MarkDown entries is easy. All HTML is legal MarkDown. However, once you start using MarkDown, it is very hard to stop. You can&#8217;t just turn off the MarkDown plugin, because all of your old posts will no longer be displayed correctly.<\/p>\n<p>I was forced to write some database scripts to migrate all of my MarkDown text to HTML.<\/p>\n<p>To be fair, I knew this was one of the consequences when I started, and I decided to accept the risk.<\/p>\n<h2>Conclusion<\/h2>\n<p>I am going to try&nbsp;blogging in pure HTML for a while, and see if I can remember how to do bullet points by hand. Wish me luck!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have just decommissioned Markdown. Here&#8217;s why.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[32,25,47,34],"tags":[],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-about-oddthinking","category-insufficiently-advanced-technology","category-review","category-software-development"],"_links":{"self":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/comments?post=133"}],"version-history":[{"count":0,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts\/133\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/media?parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/categories?post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/tags?post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}