Removed markdown extension to be put in userguide module.
This commit is contained in:
parent
56ab985be7
commit
48f32bfd8d
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue