Easier search for C++ keyword
This commit is contained in:
parent
912ffd2a04
commit
4e6ceb7dad
@ -12,12 +12,15 @@
|
|||||||
</p>
|
</p>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#search-box").bind("input", () => {
|
$("#search-box").bind("input", () => {
|
||||||
const keyword = $("#search-box").val();
|
let keyword = $("#search-box").val();
|
||||||
|
|
||||||
if(keyword == ""){
|
if(keyword == ""){
|
||||||
$("#search-results").hide();
|
$("#search-results").hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(keyword.toLowerCase() == "c++"){
|
||||||
|
keyword = "C\\+\\+";
|
||||||
|
}
|
||||||
|
|
||||||
const keywordRe = new RegExp(keyword, "i");
|
const keywordRe = new RegExp(keyword, "i");
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user