Remove some unnecessary method.

This commit is contained in:
joyqi
2021-08-26 18:25:43 +08:00
parent 91a970521c
commit 28f687e7fe
7 changed files with 156 additions and 312 deletions
-29
View File
@@ -32,34 +32,5 @@ class Markdown
return str_replace('<p><!--more--></p>', '<!--more-->', $parser->makeHtml($text));
}
/**
* transerCodeClass
*
* @param string $html
* @return string
*/
public static function transerCodeClass($html)
{
return preg_replace("/<code class=\"([_a-z0-9-]+)\">/i", "<code class=\"lang-\\1\">", $html);
}
/**
* @param $html
* @return mixed
*/
public static function transerComment($html)
{
return preg_replace_callback("/<!\-\-(.+?)\-\->/s", ['Markdown', 'transerCommentCallback'], $html);
}
/**
* @param $matches
* @return string
*/
public static function transerCommentCallback($matches)
{
return self::$parser->makeHolder($matches[0]);
}
}