From 55250f8e28453b244f78d7fdab437b0ed1739f35 Mon Sep 17 00:00:00 2001 From: spirit Date: Mon, 28 Oct 2019 17:43:19 +0800 Subject: [PATCH 1/5] fix toc of github-style --- inc/swicher.php | 3 ++- js/sakura-app.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/swicher.php b/inc/swicher.php index 030814f..508c686 100644 --- a/inc/swicher.php +++ b/inc/swicher.php @@ -60,6 +60,7 @@ mashiro_option.entry_content_theme_src = " mashiro_option.entry_content_theme_src = "/cdn/theme/github.css?"; +mashiro_option.entry_content_theme = ""; mashiro_option.jsdelivr_css_src = "/cdn/css/lib.css?"; @@ -81,4 +82,4 @@ mashiro_option.cover_api = ""; /*End of Initial Variables*/ Date: Mon, 28 Oct 2019 20:52:29 +0800 Subject: [PATCH 2/5] fix #119 --- functions.php | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/functions.php b/functions.php index afa99cf..ff613f9 100644 --- a/functions.php +++ b/functions.php @@ -1513,32 +1513,36 @@ function codecheese_register_post( $sanitized_user_login, $user_email, $errors ) // html 标签处理器 function html_tag_parser($content) { - if(!is_feed()) { - if(akina_option('lazyload') && akina_option('lazyload_spinner')){ - $content=preg_replace( - '//i', - "\n", - $content - ); - } + if(!is_feed()) { + $content=preg_replace( + '//i', + "\n", + $content + ); //Fancybox /* Markdown Regex Pattern for Matching URLs: * https://daringfireball.net/2010/07/improved_regex_for_matching_urls */ - $url_regex ='(((http|https):\/\/)?(\w(\:\w)?@)?([0-9a-z_-]+\.)*?([a-z0-9-]+\.[a-z]{2,6}(\.[a-z]{2})?(\:[0-9]{2,6})?)((\/[^?#<>\/\\*":]*)+(\?[^#]*)?(#.*)?)?)'; + $url_regex ='((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?«»“”‘’]))'; //With Thumbnail: !{alt}(url)[th_url] - $content=preg_replace( - '/!\{([^\{\}]+)*\}\('.$url_regex.'\)\['.$url_regex.'\]/i', - '', - $content - ); + if (preg_match_all('/\!\{.*?\)\[.*?\]/i', $content,$matches)){ + $i=0; + foreach ($matches as $val) { + $content=str_replace($val[$i],preg_replace( + '/!\{([^\{\}]+)*\}\('.$url_regex.'\)\['.$url_regex.'\]/i', + '', + $val[$i]), + $content); + $i++; + } + } //Without Thumbnail :!{alt}(url) $content=preg_replace( From d10a9575671e9a48033c65d9ae4c68c91ffbbef0 Mon Sep 17 00:00:00 2001 From: spirit Date: Mon, 28 Oct 2019 21:04:01 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E6=84=8F=E5=A4=96?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/functions.php b/functions.php index ff613f9..f7d3b96 100644 --- a/functions.php +++ b/functions.php @@ -1513,12 +1513,14 @@ function codecheese_register_post( $sanitized_user_login, $user_email, $errors ) // html 标签处理器 function html_tag_parser($content) { - if(!is_feed()) { - $content=preg_replace( - '//i', - "\n", - $content - ); + if(!is_feed()) { + if(akina_option('lazyload') && akina_option('lazyload_spinner')){ + $content=preg_replace( + '//i', + "\n", + $content + ); + } //Fancybox /* Markdown Regex Pattern for Matching URLs: From f4742c7e62568c7ebced603eb80de2584384e0af Mon Sep 17 00:00:00 2001 From: Dumbledore Date: Mon, 28 Oct 2019 14:07:08 +0000 Subject: [PATCH 4/5] Change Gravatar server to official --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index f7d3b96..0996d25 100644 --- a/functions.php +++ b/functions.php @@ -565,7 +565,7 @@ function get_link_items(){ */ function gravatar_cn( $url ){ $gravatar_url = array('0.gravatar.com','1.gravatar.com','2.gravatar.com','secure.gravatar.com'); - return str_replace( $gravatar_url, 'gravatar.shino.cc', $url ); + return str_replace( $gravatar_url, 'cn.gravatar.com', $url ); } add_filter( 'get_avatar_url', 'gravatar_cn', 4 ); From 3a82a1b90fac3dd8cac4165dab878517200fb226 Mon Sep 17 00:00:00 2001 From: spirit Date: Tue, 29 Oct 2019 07:21:34 +0800 Subject: [PATCH 5/5] fix #120 --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 0996d25..1e90aab 100644 --- a/functions.php +++ b/functions.php @@ -763,7 +763,7 @@ function custom_html() { if ( akina_option('login_bg') ) { $loginbg = akina_option('login_bg'); }else{ - $loginbg = get_bloginfo('template_directory').'/images/hd.png'; + $loginbg = 'https://cdn.jsdelivr.net/gh/mashirozx/Sakura@3.2.7/images/hd.png'; } echo ''."\n"; echo '