Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## master

## 3.0.27 (2026-03-09)

- 検索の表示順を、最短マッチ優先に変更
- ページの別名で検索できるように変更
- 説明専用バッジに対応
- バッジのバグ修正

## 3.0.26 (2025-12-15)

- 検索で、名前空間を除いた完全一致も優先して表示させるよう修正
Expand Down
10 changes: 10 additions & 0 deletions css/badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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") {
Expand Down
12 changes: 7 additions & 5 deletions js/crsearch/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', '説明専用')
}
}

Expand Down
4 changes: 3 additions & 1 deletion js/crsearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down