X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FText%2FMarkdown.php;h=905860647f0f83a9bb17c13f2e3d2b6a1338c29e;hb=803c1d71de9e6d13da9576660c9ab8b8bb2c19f3;hp=45f38e4c5b3896c125587619c5926a7d69e50c2f;hpb=fb7f7435c080e15bdafbbcbb5a3dfd94ef8dd952;p=friendica.git diff --git a/src/Content/Text/Markdown.php b/src/Content/Text/Markdown.php index 45f38e4c5b..905860647f 100644 --- a/src/Content/Text/Markdown.php +++ b/src/Content/Text/Markdown.php @@ -1,6 +1,6 @@ startRecording('rendering'); $MarkdownParser = new MarkdownParser(); $MarkdownParser->code_class_prefix = 'language-'; @@ -57,7 +56,7 @@ class Markdown $html = $MarkdownParser->transform($text); - DI::profiler()->saveTimestamp($stamp1, "parser"); + DI::profiler()->stopRecording(); return $html; } @@ -109,6 +108,8 @@ class Markdown */ public static function toBBCode($s) { + DI::profiler()->startRecording('rendering'); + // The parser cannot handle paragraphs correctly $s = str_replace(['

', '

', '

'], ['
', '
', '
'], $s); @@ -134,6 +135,7 @@ class Markdown // Don't show link to full picture (until it is fixed) $s = BBCode::scaleExternalImages($s); + DI::profiler()->stopRecording(); return $s; } }