Modify ↓
      
Opened 5 years ago
Last modified 2 years ago
#13350 new defect
Search word not highlighting when word's length < 3
| Reported by: | Jun Omae | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | next-stable-1.6.x | 
| Component: | search system | Version: | |
| Severity: | minor | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
In CJK environments, [search] min_query_length option often is configured with 1 or 2. However, search word is not highlighting when searching 2 characters word.
I think we should remove checking word's length in search.js:
- 
      
trac/htdocs/js/search.js
diff --git a/trac/htdocs/js/search.js b/trac/htdocs/js/search.js index e4cb164dd..110bcfc5b 100644
a b 44 44 var term = this.replace(/^\s+$/, "") 45 45 .replace(/^['"]/, "") 46 46 .replace(/['"]$/, ""); 47 if (term.length >= 3) 48 terms.push(term); 47 terms.push(term); 49 48 } 50 49 }); 51 50 return terms;  
Attachments (0)
  Note:
 See   TracTickets
 for help on using tickets.
    


  
Milestone renamed