forgejo_backup/modules/indexer
Danko Aleksejevs f7d7d67238 fix: Token.ParseIssueReference crashing on empty string (#8260)
A fix for a bug introduced by me earlier, where attempting to parse an issue reference in an empty token would crash.

An empty token occurs if the search string is `\` or `"` (among other scenarios, probably). I'll make another PR that avoids having empty tokens (seems like a good idea).

### Tests

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [x] I do not want this change to show in the release notes.
- [ ] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8260
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
Co-authored-by: Danko Aleksejevs <danko@very.lv>
Co-committed-by: Danko Aleksejevs <danko@very.lv>
2025-06-24 06:52:36 +02:00
..
code Add issue number to the search index, rank number and title matches higher (#7956) (#7968) 2025-06-04 07:42:29 +02:00
internal Add issue number to the search index, rank number and title matches higher (#7956) (#7968) 2025-06-04 07:42:29 +02:00
issues fix: Token.ParseIssueReference crashing on empty string (#8260) 2025-06-24 06:52:36 +02:00
stats chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00