diff options
author | luzpaz <luzpaz@users.noreply.github.com> | 2021-07-08 07:38:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 13:38:13 +0200 |
commit | e0296b6a6de6450c474fdf7fe62635a05beb49ab (patch) | |
tree | 1e924ac17324f60f6607e65cb51a325b948d1c62 /modules/indexer/code | |
parent | bc6f060b8cd89685cc32980c4f03cba58850cab1 (diff) | |
download | gitea-e0296b6a6de6450c474fdf7fe62635a05beb49ab.tar.gz gitea-e0296b6a6de6450c474fdf7fe62635a05beb49ab.zip |
Fix various documentation, user-facing, and source comment typos (#16367)
* Fix various doc, user-facing, and source comment typos
Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby`
Diffstat (limited to 'modules/indexer/code')
-rw-r--r-- | modules/indexer/code/elastic_search.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/indexer/code/elastic_search.go b/modules/indexer/code/elastic_search.go index 38a97ad888..569917f151 100644 --- a/modules/indexer/code/elastic_search.go +++ b/modules/indexer/code/elastic_search.go @@ -284,7 +284,7 @@ func (b *ElasticSearchIndexer) Delete(repoID int64) error { } // indexPos find words positions for start and the following end on content. It will -// return the beginning position of the frist start and the ending position of the +// return the beginning position of the first start and the ending position of the // first end following the start string. // If not found any of the positions, it will return -1, -1. func indexPos(content, start, end string) (int, int) { @@ -308,8 +308,8 @@ func convertResult(searchResult *elastic.SearchResult, kw string, pageSize int) var startIndex, endIndex int = -1, -1 c, ok := hit.Highlight["content"] if ok && len(c) > 0 { - // FIXME: Since the high lighting content will include <em> and </em> for the keywords, - // now we should find the poisitions. But how to avoid html content which contains the + // FIXME: Since the highlighting content will include <em> and </em> for the keywords, + // now we should find the positions. But how to avoid html content which contains the // <em> and </em> tags? If elastic search has handled that? startIndex, endIndex = indexPos(c[0], "<em>", "</em>") if startIndex == -1 { |