{
  "attachments": [],
  "comments_archived": true,
  "date": "2004-09-18T23:20:41.000Z",
  "excerpt": "I just made my first Kwiki formatting plugin, making Markdown formatting available.",
  "layout": "post",
  "tags": [
    "wiki"
  ],
  "title": "Markdown formatting for Kwiki",
  "wordpress_id": 552,
  "wordpress_slug": "markdown-formatting-for-kwiki",
  "wordpress_url": "http://www.decafbad.com/blog/?p=552",
  "year": "2004",
  "month": "09",
  "day": "18",
  "isDir": false,
  "slug": "markdown-formatting-for-kwiki",
  "type": "entry",
  "postName": "2004-09-18-markdown-formatting-for-kwiki",
  "html": "<p>I just made my first Kwiki formatting plugin, making <a href=\"http://daringfireball.net/projects/markdown/\">Markdown</a> formatting available.  I'm not sure that it's completely working, but maybe if I get over the lazy threshold, I'll package it up and ship it up to CPAN.  For what it's worth, here it is:</p>\n<pre><code>package Kwiki::Markdown;\nuse strict;\nuse warnings;\nuse Kwiki::Plugin '-Base';\nuse mixin 'Kwiki::Installer';\n\nuse Markdown;\n\nconst class_title =&gt; 'Markdown';\nconst class_id =&gt; 'markdown';\n\nsub register {\nmy $registry = shift;\n$registry-&gt;add( wafl =&gt; markdown =&gt; 'Kwiki::Markdown::Wafl' );\n}\n\npackage Kwiki::Markdown::Wafl;\nuse base qw( Spoon::Formatter::WaflBlock );\n\nsub to_html {\n   Markdown::Markdown($self-&gt;block_text);\n}\n\npackage Kwiki::Markdown;\n__DATA__\n</code></pre>\n<p>And, not that I planned it this way, but I just realized that I'm wearing my <a href=\"http://daringfireball.net/members/\">Daring Fireball t-shirt</a> this very moment.  Heh, heh.</p>\n<div id=\"comments\" class=\"comments archived-comments\"><h3>Archived Comments</h3>\n<ul class=\"comments\">\n<li class=\"comment\" id=\"comment-221087548\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"http://trikuare.cx/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=7d3d1e46aae8ca19855a6026d404b91d&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"http://trikuare.cx/\">fluffy</a>\n</div>\n\n\n<p><a href=\"#comment-221087548\" class=\"permalink\"><time datetime=\"2004-09-18T22:07:23\">2004-09-18T22:07:23</time></a></p>\n</div>\n\n\n<div class=\"content\">That certainly did seem difficult!\nYou're on a roll.  Now add in phpBB comment support. ;)</div>\n\n\n</li>\n<li class=\"comment\" id=\"comment-221087549\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"http://pixelcort.com/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=501ebb4805e74dddc5c0b33b16fca819&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"http://pixelcort.com/\">Cortland Klein</a>\n</div>\n\n\n<p><a href=\"#comment-221087549\" class=\"permalink\"><time datetime=\"2005-01-05T23:59:39\">2005-01-05T23:59:39</time></a></p>\n</div>\n\n\n<div class=\"content\">How can this be applied to Kwiki?</div>\n\n\n</li>\n</ul>\n\n\n</div>\n\n\n",
  "body": "I just made my first Kwiki formatting plugin, making [Markdown][markdown] formatting available.  I'm not sure that it's completely working, but maybe if I get over the lazy threshold, I'll package it up and ship it up to CPAN.  For what it's worth, here it is:\r\n\r\n    package Kwiki::Markdown;\r\n    use strict;\r\n    use warnings;\r\n    use Kwiki::Plugin '-Base';\r\n    use mixin 'Kwiki::Installer';\r\n    \r\n    use Markdown;\r\n    \r\n    const class_title => 'Markdown';\r\n    const class_id => 'markdown';\r\n    \r\n    sub register {\r\n\tmy $registry = shift;\r\n\t$registry->add( wafl => markdown => 'Kwiki::Markdown::Wafl' );\r\n    }\r\n    \r\n    package Kwiki::Markdown::Wafl;\r\n    use base qw( Spoon::Formatter::WaflBlock );\r\n    \r\n    sub to_html {\r\n       Markdown::Markdown($self->block_text);\r\n    }\r\n    \r\n    package Kwiki::Markdown;\r\n    __DATA__\r\n    \r\nAnd, not that I planned it this way, but I just realized that I'm wearing my [Daring Fireball t-shirt][tshirt] this very moment.  Heh, heh.\r\n\r\n[markdown]: http://daringfireball.net/projects/markdown/\r\n[tshirt]: http://daringfireball.net/members/\r\n\r\n<div id=\"comments\" class=\"comments archived-comments\">\r\n            <h3>Archived Comments</h3>\r\n            \r\n        <ul class=\"comments\">\r\n            \r\n        <li class=\"comment\" id=\"comment-221087548\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"http://trikuare.cx/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=7d3d1e46aae8ca19855a6026d404b91d&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"http://trikuare.cx/\">fluffy</a>\r\n                </div>\r\n                <a href=\"#comment-221087548\" class=\"permalink\"><time datetime=\"2004-09-18T22:07:23\">2004-09-18T22:07:23</time></a>\r\n            </div>\r\n            <div class=\"content\">That certainly did seem difficult!\r\n\r\nYou're on a roll.  Now add in phpBB comment support. ;)</div>\r\n            \r\n        </li>\r\n    \r\n        <li class=\"comment\" id=\"comment-221087549\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"http://pixelcort.com/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=501ebb4805e74dddc5c0b33b16fca819&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"http://pixelcort.com/\">Cortland Klein</a>\r\n                </div>\r\n                <a href=\"#comment-221087549\" class=\"permalink\"><time datetime=\"2005-01-05T23:59:39\">2005-01-05T23:59:39</time></a>\r\n            </div>\r\n            <div class=\"content\">How can this be applied to Kwiki?</div>\r\n            \r\n        </li>\r\n    \r\n        </ul>\r\n    \r\n        </div>\r\n    ",
  "parentPath": "./content/posts/archives/2004",
  "path": "2004/09/18/markdown-formatting-for-kwiki",
  "needsBuild": true,
  "prevPostPath": "2004/09/18/moving-toward-kwiki-away-from-twiki",
  "prevPostTitle": "Moving toward Kwiki, away from TWiki",
  "nextPostPath": "2004/09/18/feedreactor-dbagg3-notes",
  "nextPostTitle": "Initial dbagg3 / feedReactor notes in Kwiki"
}