File tree 1 file changed +3
-2
lines changed
Distribution/Server/Features/Search
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,15 @@ import Data.Char
16
16
import qualified NLP.Tokenize as NLP
17
17
import qualified NLP.Snowball as NLP
18
18
import qualified Data.Foldable as F
19
+ import Data.List (intercalate )
19
20
20
21
import qualified Documentation.Haddock.Markup as Haddock
21
22
import Documentation.Haddock.Types
22
23
23
24
import qualified Distribution.Server.Pages.Package.HaddockParse as Haddock (parse )
24
25
25
26
extraStems :: [Text ] -> Text -> [Text ]
26
- extraStems ss x = x : mapMaybe (x `T.stripSuffix` ) ss
27
+ extraStems ss x = x : mapMaybe (`T.stripSuffix` x ) ss
27
28
28
29
extractSynopsisTerms :: [Text ] -> Set Text -> String -> [Text ]
29
30
extractSynopsisTerms ss stopWords =
@@ -63,7 +64,7 @@ extractDescriptionTerms ss stopWords =
63
64
[] -- TODO: something here
64
65
( filter (not . ignoreTok)
65
66
. NLP. tokenize
66
- . concat . Haddock. markup termsMarkup)
67
+ . intercalate " " . Haddock. markup termsMarkup)
67
68
. Haddock. parse
68
69
69
70
termsMarkup :: DocMarkupH () String [String ]
You can’t perform that action at this time.
0 commit comments