mirror of
https://github.com/tursom/typecho-prism.git
synced 2025-01-13 21:30:16 +08:00
删除空白字符插件
This commit is contained in:
parent
614bf0d98c
commit
5bcd771174
@ -71,7 +71,7 @@ class Prismjs_Plugin implements Typecho_Plugin_Interface
|
||||
public static function header()
|
||||
{
|
||||
$cssUrl = Helper::options()->pluginUrl . '/Prismjs/src/prism.css';
|
||||
echo '<link rel="stylesheet" type="text/css" href="' . $cssUrl . '?v3" />';
|
||||
echo '<link rel="stylesheet" type="text/css" href="' . $cssUrl . '?v4" />';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -84,7 +84,7 @@ class Prismjs_Plugin implements Typecho_Plugin_Interface
|
||||
public static function footer()
|
||||
{
|
||||
$jsUrl = Helper::options()->pluginUrl . '/Prismjs/src/prism.js';
|
||||
echo '<script type="text/javascript" src="' . $jsUrl . '?v3"></script>';
|
||||
echo '<script type="text/javascript" src="' . $jsUrl . '?v4"></script>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,6 +99,7 @@ class Prismjs_Plugin implements Typecho_Plugin_Interface
|
||||
|
||||
if ($widget instanceof Widget_Archive || $widget instanceof Widget_Abstract_Comments) {
|
||||
$text = str_replace('<pre><code>', '<pre><code class="lang-auto">', $text);
|
||||
$text = str_replace('<pre>', '<pre class="line-numbers">', $text);
|
||||
$text = str_replace('lang-sh', 'lang-shell', $text);
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user