Edgewall Software
Modify

Opened 3 years ago

Last modified 7 months 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  
    4444              var term = this.replace(/^\s+$/, "")
    4545                         .replace(/^['"]/, "")
    4646                         .replace(/['"]$/, "");
    47               if (term.length >= 3)
    48                 terms.push(term);
     47              terms.push(term);
    4948            }
    5049          });
    5150          return terms;

Attachments (0)

Change History (1)

comment:1 by Ryan J Ollos, 7 months ago

Milestone: next-stable-1.4.xnext-stable-1.6.x

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.