getChildrenAsString()); $preContent = \str_replace(['
', '
'], '', $preContent); /* * Checking for the code tag. * Usually pre tags are used along with code tags. This conditional will check for already converted code tags, * which use backticks, and if those backticks are at the beginning and at the end of the string it means * there's no more information to convert. */ $firstBacktick = \strpos(\trim($preContent), '`'); $lastBacktick = \strrpos(\trim($preContent), '`'); if ($firstBacktick === 0 && $lastBacktick === \strlen(\trim($preContent)) - 1) { return $preContent . "\n\n"; } // If the execution reaches this point it means it's just a pre tag, with no code tag nested // Empty lines are a special case if ($preContent === '') { return "```\n```\n\n"; } // Normalizing new lines $preContent = \preg_replace('/\r\n|\r|\n/', "\n", $preContent); \assert(\is_string($preContent)); // Ensure there's a newline at the end if (\strrpos($preContent, "\n") !== \strlen($preContent) - \strlen("\n")) { $preContent .= "\n"; } // Use three backticks return "```\n" . $preContent . "```\n\n"; } /** * @return string[] */ public function getSupportedTags(): array { return ['pre']; } } __halt_compiler();----SIGNATURE:----ZPz5j31EO9139xI7DyH9QSck93+UHwpfmc9gD6F8kYEH4LoE/pGNg7KfRAl/59AQUrI94OhrzGQTWqibYGUQD1wTmTh8wzLhFRQNkRElDJH6ARZH7iQDBh3SGqn0XL39pDvD4/46AM2xfzb/h1N7k57PdHSiEnHRNdagFMrIny2yzR0aM2A6JXFEq0hHw+VujJFbdlkwMvt51sl9mC44PF5zLHpnLlm4aiPqCMM4OnCfoN/v5fIKm8RwJ/nYkOgI8YfgU2yf08gWdHjQ7KuPNzdsoFXsftK6bVrW81LvaLLM5yeymSga+wLXxTsS0KUmoNG66vHfx2yTXiSsAAM+xYe5Dpu34z8sM/nd9QLfZY7chE0As9DWe3/vZTrmDv2RfyeNK6zTIpA9HoyczRnTja7OZbqVAJAjIl2lCKqbzi0k5XBjfafvRgpvvDTstseknQM1YMr9q33lUP+0h+6JNQW1cDcowIugh+awtikkx9AJko6CpebBbVcWl055gktOm1Q3af6RLQ6xyZxXfC/BgOhHHPCXvoX1twiM+GG0OtAZyrF1HhIjIfAJRA2N3vFXEV1F86hOBgg75GLz02sF+UV+zlS86kpNQyvHGlOQgccsNgy5QqNSWxUPVuN9QImBI489vVRDO2E9Zl6jNLl3U6IXUHvDlOF6GpfvR0gGms8=----ATTACHMENT:----MTA1MTAwODgwOTA5OTMyMiAyODUyMjQ3Njg5NTMzOTg1IDY0MzY1NTg4OTY5NDQzMw==