mirror of
https://github.com/tursom/typecho-prism.git
synced 2025-01-29 21:30:20 +08:00
add full prism
This commit is contained in:
parent
17d7b1dd66
commit
614bf0d98c
@ -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 . '?v2" />';
|
||||
echo '<link rel="stylesheet" type="text/css" href="' . $cssUrl . '?v3" />';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -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 . '?v2"></script>';
|
||||
echo '<script type="text/javascript" src="' . $jsUrl . '?v3"></script>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,6 +98,7 @@ class Prismjs_Plugin implements Typecho_Plugin_Interface
|
||||
$text = empty($lastResult) ? $text : $lastResult;
|
||||
|
||||
if ($widget instanceof Widget_Archive || $widget instanceof Widget_Abstract_Comments) {
|
||||
$text = str_replace('<pre><code>', '<pre><code class="lang-auto">', $text);
|
||||
$text = str_replace('lang-sh', 'lang-shell', $text);
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
305
src/prism.js
305
src/prism.js
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user