From 948356d7d632feae1e694e0a6ce20f7e975c7e50 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 5 Jan 2022 00:53:16 +0800 Subject: [PATCH 1/3] Fix `` HTML element refactoring issue (resolve #476, close #477) --- _includes/refactor-content.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_includes/refactor-content.html b/_includes/refactor-content.html index b47e0a9..8f8b042 100644 --- a/_includes/refactor-content.html +++ b/_includes/refactor-content.html @@ -56,9 +56,10 @@ {% assign _height = nil %} {% assign _src = nil %} - {% assign _left = _img_snippet | split: '/>' | first %} - {% assign _right = _img_snippet | replace: _left, '' %} + {% assign _left = _img_snippet | split: '>' | first %} + {% assign _right = _img_snippet | remove: _left %} + {% assign _left = _left | remove: ' /' %} {% assign _left = _left | replace: ' w=', ' width=' | replace: ' h=', ' height=' %} {% assign _attrs = _left | split: ' ' %} From b44bf78f1037c4ab73acfaad3c33f52168b13ef7 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 5 Jan 2022 02:35:12 +0800 Subject: [PATCH 2/3] Improve the creation of header anchors (fix #474) --- _includes/refactor-content.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_includes/refactor-content.html b/_includes/refactor-content.html index 8f8b042..bd87864 100644 --- a/_includes/refactor-content.html +++ b/_includes/refactor-content.html @@ -208,7 +208,9 @@ {% capture anchor %}{% endcapture %} {% assign left = snippet | split: mark_end | first %} - {% assign right = snippet | replace: left, '' %} + {% assign _start_index = left | size %} + {% assign _end_index = snippet | size | minus: 1 %} + {% assign right = snippet | slice: _start_index, _end_index %} {% assign _new_content = _new_content | append: mark_start | append: left | append: anchor | append: mark_end | append: right From 22e2367b45d026e492950130fbe01a4171952a55 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 5 Jan 2022 03:11:24 +0800 Subject: [PATCH 3/3] Bump version to 5.0.1 --- _javascript/copyright | 2 +- _sass/jekyll-theme-chirpy.scss | 2 +- assets/js/dist/categories.min.js | 2 +- assets/js/dist/commons.min.js | 2 +- assets/js/dist/home.min.js | 2 +- assets/js/dist/page.min.js | 2 +- assets/js/dist/post.min.js | 2 +- assets/js/dist/pvreport.min.js | 2 +- jekyll-theme-chirpy.gemspec | 2 +- package.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/_javascript/copyright b/_javascript/copyright index 422b434..1784fc4 100644 --- a/_javascript/copyright +++ b/_javascript/copyright @@ -1,5 +1,5 @@ /*! - * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/_sass/jekyll-theme-chirpy.scss b/_sass/jekyll-theme-chirpy.scss index 40882b1..2d20cc2 100644 --- a/_sass/jekyll-theme-chirpy.scss +++ b/_sass/jekyll-theme-chirpy.scss @@ -1,7 +1,7 @@ /*! * The styles for Jekyll theme Chirpy * - * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy) + * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/categories.min.js b/assets/js/dist/categories.min.js index e6f88e6..611e5e8 100644 --- a/assets/js/dist/categories.min.js +++ b/assets/js/dist/categories.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/commons.min.js b/assets/js/dist/commons.min.js index e19c78a..5ea9898 100644 --- a/assets/js/dist/commons.min.js +++ b/assets/js/dist/commons.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/home.min.js b/assets/js/dist/home.min.js index 6cecd21..55576d2 100644 --- a/assets/js/dist/home.min.js +++ b/assets/js/dist/home.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/page.min.js b/assets/js/dist/page.min.js index 7f9c46e..cdcf8af 100644 --- a/assets/js/dist/page.min.js +++ b/assets/js/dist/page.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/post.min.js b/assets/js/dist/post.min.js index 83552ab..e42751a 100644 --- a/assets/js/dist/post.min.js +++ b/assets/js/dist/post.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/assets/js/dist/pvreport.min.js b/assets/js/dist/pvreport.min.js index 18152de..9d57290 100644 --- a/assets/js/dist/pvreport.min.js +++ b/assets/js/dist/pvreport.min.js @@ -1,5 +1,5 @@ /*! - * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/) + * Chirpy v5.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/) * © 2019 Cotes Chung * MIT Licensed */ diff --git a/jekyll-theme-chirpy.gemspec b/jekyll-theme-chirpy.gemspec index 1108c45..663c6c2 100644 --- a/jekyll-theme-chirpy.gemspec +++ b/jekyll-theme-chirpy.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "jekyll-theme-chirpy" - spec.version = "5.0.0" + spec.version = "5.0.1" spec.authors = ["Cotes Chung"] spec.email = ["cotes.chung@gmail.com"] diff --git a/package.json b/package.json index fd510b3..0381faa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jekyll-theme-chirpy", - "version": "5.0.0", + "version": "5.0.1", "description": "A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation.", "main": "index.js", "directories": {