X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FText%2FMarkdown.php;h=8173a62af770dd487d8a3d80d4bbe9fec7d6f8be;hb=ed350e472fb66e78cd9da066dc8684784bfc6c07;hp=cfd83a38d8e261d3aff18aabb8a8a2bcd4211061;hpb=f10062dfdbacb48910482678d919ad37de57015f;p=friendica.git diff --git a/src/Content/Text/Markdown.php b/src/Content/Text/Markdown.php index cfd83a38d8..8173a62af7 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; } }