Removed markdown extension to be put in userguide module.

This commit is contained in:
Dan Robertson 2010-09-06 10:56:55 +08:00 committed by Jeremy Bush
parent 56ab985be7
commit 48f32bfd8d

View file

@ -1,30 +0,0 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
class Kodoc_Markdown extends Kohana_Kodoc_Markdown {
public function doIncludeViews($text)
{
if (preg_match_all('/{{([^\s{}]++)}}/', $text, $matches, PREG_SET_ORDER))
{
$replace = array();
foreach ($matches as $set)
{
list($search, $view) = $set;
try
{
$replace[$search] = View::factory($view)->render();
}
catch (Exception $e)
{
// View file not found. Do not replace {{text}}.
}
}
$text = strtr($text, $replace);
}
return $text;
}
}