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/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 bde53b9..37ef6b3 100644 --- a/js/crsearch/dom.js +++ b/js/crsearch/dom.js @@ -29,13 +29,15 @@ 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})`) - li.attr('named-version', attr) + 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', '説明専用') } } 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) 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",