Description
Description
When calling https://codeberg.org/Codeberg/gitea/src/branch/codeberg-1.17/README.md?display=source#L0 it is internally redirected to https://codeberg.org/Codeberg/gitea/src/branch/codeberg-1.17/README.md?display=source#undefined
which leads to the following javascript error:
JavaScript error: Uncaught TypeError: Cannot read properties of undefined (reading 'length') (https://codeberg.org/assets/js/index.js?v=1.17.3~87-ge4b8341 @ 83:11976). Open browser console to see more details.
Maybe line numbers < 1 can simply be ignored as github does:
https://github.com/go-gitea/gitea/blob/main/README.md?plain=1#L0
This would fix issues with links from external systems that don't check the line number properly.
Gitea Version
1.17.3
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
helm chart
Database
PostgreSQL