From 7bdfeb495042259f20f7739e8ebd64d86bbf87f0 Mon Sep 17 00:00:00 2001 From: Raclamusi Date: Mon, 9 Mar 2026 12:25:42 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=E5=A4=89=E6=95=B0=E5=AE=A3=E8=A8=80?= =?UTF-8?q?=E3=81=AE=20const=20=E5=BF=98=E3=82=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit グローバルの name プロパティに代入されていました。 --- js/crsearch/dom.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/crsearch/dom.js b/js/crsearch/dom.js index bde53b9..b9f9cae 100644 --- a/js/crsearch/dom.js +++ b/js/crsearch/dom.js @@ -29,9 +29,9 @@ export default class DOM { li.addClass('added-in-spec').attr('title', `${cppv}で追加`) } } else { - name = attr == 'future' ? '将来' : - attr == 'archive' ? '廃案' : - null + const name = attr == 'future' ? '将来' : + attr == 'archive' ? '廃案' : + null if (name) { li.addClass('named-version-spec').attr('title', `C++ (${name})`) From 4ef9d94f9a7abc745c574b12488adb19b5b04750 Mon Sep 17 00:00:00 2001 From: Raclamusi Date: Mon, 9 Mar 2026 12:27:19 +0900 Subject: [PATCH 2/5] =?UTF-8?q?named-version=20=E3=82=92=20data-named-vers?= =?UTF-8?q?ion=20=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit このコミットでデータ属性を使うように変更されています。 https://github.com/cpprefjp/crsearch/commit/befe1e3eff86a44ac0a31b87ed6f786c26b1940c --- js/crsearch/dom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/crsearch/dom.js b/js/crsearch/dom.js index b9f9cae..3b06e35 100644 --- a/js/crsearch/dom.js +++ b/js/crsearch/dom.js @@ -34,8 +34,8 @@ export default class DOM { null if (name) { - li.addClass('named-version-spec').attr('title', `C++ (${name})`) - li.attr('named-version', attr) + li.addClass('named-version-spec').attr('title', `C++ (${name})`) + li.attr('data-named-version', attr) } } From 80f3956402159bddc23610a7985a99ecb860dae8 Mon Sep 17 00:00:00 2001 From: Raclamusi Date: Mon, 9 Mar 2026 12:44:12 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E7=A9=BA=E7=99=BD=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=83=83=E3=82=B8=E3=81=8C=E3=81=A7=E3=81=8D=E3=82=8B=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C++ (将来) と C++ (廃案) の時にも追加バージョンのバッジが作成され、空白のバッジが表示されていました。 --- js/crsearch/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/crsearch/index.js b/js/crsearch/index.js index 1eb90a9..fab7729 100644 --- a/js/crsearch/index.js +++ b/js/crsearch/index.js @@ -63,7 +63,9 @@ export default class Index { const attrs = [] if (!opts.badges.noselfcpp && this._cpp_version) { - attrs.push(`added-in-cpp${this._cpp_version}`) + if (!/^(?:future|archive)$/.test(this._cpp_version)) { + attrs.push(`added-in-cpp${this._cpp_version}`) + } } if (this._attributes) { attrs.push(...this._attributes) From dd4f7755c48b3c414000e334a975ddd264e1010b Mon Sep 17 00:00:00 2001 From: Raclamusi Date: Mon, 9 Mar 2026 15:48:49 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E8=AA=AC=E6=98=8E=E5=B0=82=E7=94=A8?= =?UTF-8?q?=E3=83=90=E3=83=83=E3=82=B8=E7=94=A8=E3=81=AE=E3=82=B9=E3=82=BF?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/badge.scss | 10 ++++++++++ js/crsearch/dom.js | 2 ++ 2 files changed, 12 insertions(+) diff --git a/css/badge.scss b/css/badge.scss index 5798a2b..0b27a7e 100644 --- a/css/badge.scss +++ b/css/badge.scss @@ -59,6 +59,10 @@ @include cr-badge-spec(#7473CA, '.fa-archive'); } + &.exposition-only-spec { + @include cr-badge-spec(#666, '.fa-sticky-note-o'); + } + &.latest-spec a { display: flex; } @@ -173,6 +177,12 @@ content: "C++ (廃案)"; } } + + #{$sel}.exposition-only-spec { + & a:before, & ~ #{$sel}.latest-spec:not(.noprefix) a:before { + content: "説明専用"; + } + } } @mixin cr-badge-auto($sel: "li.badge") { diff --git a/js/crsearch/dom.js b/js/crsearch/dom.js index 3b06e35..37ef6b3 100644 --- a/js/crsearch/dom.js +++ b/js/crsearch/dom.js @@ -36,6 +36,8 @@ export default class DOM { if (name) { li.addClass('named-version-spec').attr('title', `C++ (${name})`) li.attr('data-named-version', attr) + } else if (attr == 'exposition-only') { + li.addClass('exposition-only-spec').attr('title', '説明専用') } } From 61b8f30da8b694275957a23ca6cb8e855c7f4bf9 Mon Sep 17 00:00:00 2001 From: Raclamusi Date: Mon, 9 Mar 2026 18:34:20 +0900 Subject: [PATCH 5/5] v3.0.27 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb08abc..46cf572 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## master +## 3.0.27 (2026-03-09) + +- 検索の表示順を、最短マッチ優先に変更 +- ページの別名で検索できるように変更 +- 説明専用バッジに対応 +- バッジのバグ修正 + ## 3.0.26 (2025-12-15) - 検索で、名前空間を除いた完全一致も優先して表示させるよう修正 diff --git a/package-lock.json b/package-lock.json index a24264e..7c19614 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "crsearch", - "version": "3.0.26", + "version": "3.0.27", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "crsearch", - "version": "3.0.26", + "version": "3.0.27", "license": "MIT", "dependencies": { "@babel/runtime": "^7.10.3", diff --git a/package.json b/package.json index b98f7ee..da69865 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "crsearch", - "version": "3.0.26", + "version": "3.0.27", "description": "cpprefjp / boostjp searcher", "main": "dist/js/crsearch.js", "module": "js/crsearch.js",