small bug fix

This commit is contained in:
Kanti 2014-08-11 17:15:05 +02:00
commit 0ef08de74c

View file

@ -1055,6 +1055,9 @@ function get_title_from_file($v)
// Get the contents and convert it to HTML
$content = MarkdownExtra::defaultTransform(file_get_contents($v));
$replaced = substr($v, 0, strrpos($v, '/')) . '/';
$base = str_replace($replaced, '', $v);
// Extract the title and body
return get_content_tag('t',$content,str_replace('-', ' ', str_replace('.md', '', $base)));
}