X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FText%2FMarkdown.php;h=905860647f0f83a9bb17c13f2e3d2b6a1338c29e;hb=d78661817e71fceb4dd729c101277da33fdeb31b;hp=cfd83a38d8e261d3aff18aabb8a8a2bcd4211061;hpb=db3f90ec011202f2e611cc1a8155041a9879bd9e;p=friendica.git diff --git a/src/Content/Text/Markdown.php b/src/Content/Text/Markdown.php index cfd83a38d8..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", System::callstack()); + DI::profiler()->stopRecording(); return $html; } @@ -83,7 +82,7 @@ class Markdown return ''; } - $data = Contact::getDetailsByAddr($matches[3]); + $data = Contact::getByURL($matches[3]); if (empty($data)) { return ''; @@ -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; } }