diff --git a/resources/views/components/theme.blade.php b/resources/views/components/theme.blade.php index a351e1b..fb3419a 100644 --- a/resources/views/components/theme.blade.php +++ b/resources/views/components/theme.blade.php @@ -28,22 +28,15 @@
' . preg_replace($reg_exUrl, "$url[0] ", $text) . ''; - echo preg_replace('/[ \t]+/', ' ', preg_replace('/\s\S*$^\s\S*/m', "\n", $txtspc)); - -} else { - - echo '
' . preg_replace('/[ \t]+/', ' ', preg_replace('/\s\S*$^\s\S*/m', "\n", $txtspc)) . ''; - -} +$str = file_get_contents('themes/' . $info->theme . '/readme.md'); +$url_pattern = '/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/'; +$str= preg_replace($url_pattern, '$0', $str); +$txtspc = '
' . $str . ''; +echo preg_replace('/[ \t]+/', ' ', preg_replace('/\s\S*$^\s\S*/m', "\n", $txtspc)); ?> +