Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5 from pharo-spec/feat/bettersearch
Browse files Browse the repository at this point in the history
improving the search
  • Loading branch information
Ducasse authored Aug 31, 2021
2 parents f44dc6b + 25f162e commit c098a34
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,16 @@ StHelpBrowserPresenter class >> openOnHelpFolder: aFileReference [
yourself
]

{ #category : #'as yet unclassified' }
{ #category : #'basic search' }
StHelpBrowserPresenter class >> search: aTopicName in: topicCollection with: aCollection [

| lookedup |
lookedup := aTopicName asLowercase.

topicCollection ifNotEmpty: [
topicCollection doWithIndex: [ :topic :i |
aCollection add: i.
topic title = aTopicName
((topic title asLowercase splitOn: Character space) anySatisfy: [ :each | lookedup match: each ])
ifTrue: [ ^ aCollection ]
ifFalse: [ (self search: aTopicName in: topic subtopics with: aCollection) isCollection
ifTrue: [ ^ aCollection]].
Expand Down

0 comments on commit c098a34

Please sign in to comment.