Easier search for C++ keyword

This commit is contained in:
Crom (Thibaut CHARLES) 2021-01-29 18:48:17 +01:00
parent 912ffd2a04
commit 4e6ceb7dad
Signed by: tcharles
GPG Key ID: 45A3D5F880B9E6D0

View File

@ -12,12 +12,15 @@
</p>
<script type="text/javascript">
$("#search-box").bind("input", () => {
const keyword = $("#search-box").val();
let keyword = $("#search-box").val();
if(keyword == ""){
$("#search-results").hide();
return;
}
if(keyword.toLowerCase() == "c++"){
keyword = "C\\+\\+";
}
const keywordRe = new RegExp(keyword, "i");
let count = 0;