File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export default Service.extend({
1212 search ( phrase ) {
1313 return this . loadSearchIndex ( )
1414 . then ( ( { index, documents } ) => {
15- let words = phrase . toLowerCase ( ) . split ( config [ 'ember-cli-addon-docs' ] . searchTokenSeparator ) ;
15+ let words = phrase . toLowerCase ( ) . split ( new RegExp ( config [ 'ember-cli-addon-docs' ] . searchTokenSeparator ) ) ;
1616 let results = index . query ( ( query ) => {
1717 // In the future we could boost results based on the field they come from
1818 for ( let word of words ) {
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ module.exports = {
4848 projectTag : this . parent . pkg . version ,
4949 projectHref : info && info . browse ( ) ,
5050 deployVersion : 'ADDON_DOCS_DEPLOY_VERSION' ,
51- searchTokenSeparator : / \s + /
51+ searchTokenSeparator : "\\s+"
5252 }
5353 } ;
5454
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ module.exports = class SearchIndexCompiler extends Writer {
2727 this . field ( 'text' ) ;
2828 this . field ( 'keywords' ) ;
2929
30- this . tokenizer . separator = writer . config [ 'ember-cli-addon-docs' ] . searchTokenSeparator ;
30+ this . tokenizer . separator = new RegExp ( writer . config [ 'ember-cli-addon-docs' ] . searchTokenSeparator ) ;
3131
3232 for ( let doc of writer . buildDocuments ( ) ) {
3333 if ( doc ) {
You can’t perform that action at this time.
0 commit comments