Easier search for C++ keyword
This commit is contained in:
		
							parent
							
								
									912ffd2a04
								
							
						
					
					
						commit
						4e6ceb7dad
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -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…
	
	Add table
		
		Reference in a new issue