|
|
@@ -643,7 +643,15 @@ class MdRender{
|
|
|
$output = str_replace('<img src="','<img src="'.config('app.url'),$output);
|
|
|
break;
|
|
|
case 'markdown':
|
|
|
- $output = $markdownWithTpl;
|
|
|
+ //处理脚注
|
|
|
+ $footnotes = array();
|
|
|
+ if($this->options['footnote'] && isset($GLOBALS['note']) && count($GLOBALS['note'])>0){
|
|
|
+ foreach ($GLOBALS['note'] as $footnote) {
|
|
|
+ $footnotes[] = '[^'.$footnote['sn'].']: ' . $footnote['content'];
|
|
|
+ }
|
|
|
+ unset($GLOBALS['note']);
|
|
|
+ }
|
|
|
+ $output = $markdownWithTpl . "\n\n" . implode("\n\n",$footnotes);
|
|
|
break;
|
|
|
}
|
|
|
return $output;
|