mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-17 02:47:51 +01:00
Search: Support hashtags. Remove # prefix when indexing words.
This commit is contained in:
@@ -25,6 +25,9 @@ func text2Hashes(text string, hashes map[[32]byte]string) {
|
||||
})
|
||||
|
||||
for _, word := range words {
|
||||
// remove hash tag prefix
|
||||
word = strings.TrimPrefix(word, "#")
|
||||
|
||||
hashWordMap(word, hashes)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user