forgejo/web_src/js/features
Robert Wolff 18705e2fe0 feat(ui): improve multiline file preview and anchor detection (#9145)
This PR solves some little annoyance for me by allowing line ranges for inline file previews and source links to be of the form `L1-9` instead of necessarily `L1-L9`.
For links to source files it allows also `n1-9` or `n1-n9` in agreement with already allowed single line anchors `n1`.

### Tests

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.
  - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [x] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-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

- [ ] I do not want this change to show in the release notes.
- [x] 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/9145
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-committed-by: Robert Wolff <mahlzahn@posteo.de>
2025-09-04 22:51:22 +02:00
..
admin fix(ui): only run auth_name code on new and edit page (#7470) 2025-04-06 12:25:29 +00:00
comp feat: make text expander aware of custom emojis 2025-08-10 23:11:41 +02:00
autofocus-end.js
captcha.js
citation.js Remove APA as cite format 2024-07-20 15:48:57 +02:00
clipboard.js
code-frequency.js
codeeditor.js Remove obsolete monaco workaround (#30893) 2024-05-12 20:03:10 +02:00
colorpicker.js Replace coloris with vanilla-colorful (#30201) 2024-04-07 15:40:31 +02:00
common-global.js feat: require data-modal-id for delete buttons (#8711) 2025-08-08 01:53:23 +02:00
common-issue-list.js
common-issue-list.test.js
common-organization.js
contextpopup.js
contributors.js Add "n commits" link to contributors in contributors graph page (#32799) 2024-12-15 13:21:02 +01:00
copycontent.js
dropzone.js
emoji.js feat: make text expander aware of custom emojis 2025-08-10 23:11:41 +02:00
eventsource.sharedworker.js chore: add new lint rules 2024-10-23 08:10:18 +02:00
file-fold.js
heatmap.js
imagediff.js Refactor imagediff and fix regression bug (#30694) 2024-04-28 15:39:01 +02:00
install.js
notification.js
org-team.js chore: enable no-jquery/no-each-util 2025-04-01 03:59:12 +02:00
pull-view-file.js
recent-commits.js
repo-branch.js
repo-code.js feat(ui): improve multiline file preview and anchor detection (#9145) 2025-09-04 22:51:22 +02:00
repo-code.test.js feat(ui): improve multiline file preview and anchor detection (#9145) 2025-09-04 22:51:22 +02:00
repo-commit.js feat: show CI status on force-pushes (#8655) 2025-08-13 03:29:36 +02:00
repo-common.js fix(ui): make tag dropdown clickable again (#7558) 2025-04-16 12:28:39 +00:00
repo-diff-commit.js
repo-diff-commitselect.js
repo-diff-filetree.js Remove DiffFileList component 2025-01-19 18:56:18 +01:00
repo-diff.js Remove DiffFileList component 2025-01-19 18:56:18 +01:00
repo-editor.js feat: remove fomantic's tab module (#8587) 2025-07-21 22:33:17 +02:00
repo-findfile.js
repo-findfile.test.js
repo-graph.js fix branch selector in commit graph 2024-07-07 20:26:30 +02:00
repo-home.js Add null check for responseData.invalidTopics (#32212) 2024-10-13 08:06:49 +03:00
repo-issue-content.js
repo-issue-list.js
repo-issue-pr-form.js
repo-issue-pr-status.js
repo-issue.js fix: allow for tracked time to be removed again (#8575) 2025-07-19 16:34:21 +02:00
repo-issue.test.js feat(ui): add more emoji and code block rendering in issues 2024-09-24 14:20:33 +02:00
repo-legacy.js fix: correct image source for quoted reply (#8565) 2025-07-19 15:03:10 +02:00
repo-migrate.js fix(ui): prevent exceptions on other users' repo migration pages 2024-08-21 19:57:08 +00:00
repo-migration.js Add support for migrating from Pagure (#8513) 2025-08-11 16:56:26 +02:00
repo-milestone.js feat: use combo markdown editor for milestone description 2024-10-22 19:58:44 +02:00
repo-projects.js Fix various problems around projects board view (#30696) 2024-05-12 20:03:10 +02:00
repo-release.js fix(ui): release: set default release title to tag name (#6883) 2025-02-23 08:30:39 +00:00
repo-search.js
repo-settings.js chore: enable no-jquery/no-each-util 2025-04-01 03:59:12 +02:00
repo-template.js chore: enable no-jquery/no-each-util 2025-04-01 03:59:12 +02:00
repo-unicode-escape.js
repo-wiki.js
sshkey-helper.js fix(ui): clear fields when canceling adding ssh key (#8990) 2025-09-01 09:24:42 +02:00
stopwatch.js
tablesort.js
tribute.js
user-auth-webauthn.js
user-auth.js feat: improve incorrect ROOT_URL warning (#7103) 2025-03-03 18:05:01 +00:00