gitea/modules
Luke H-W 5fe3296055
Disable Field count validation of CSV viewer (#35228)
Default behaviour rejected all rows (Records) with more or fewer columns
(Fields) than the first row, preventing them from parsing at all and
silently hiding them. While RFC4180 section 2.4 says each line _should_
contain the same number of fields, enforcing this on the viewer is
unhelpful.
This pull request disables that validation, allowing the viewer to
render lines with fewer columns than the maximum number within the file.
As it's a simple HTML table, this works without additional changes (i.e.
no need to manually determine the maximum number of columns), but the
default appearance of rows with fewer columns may be undesirable to some
people, especially when using CSS that has `td {border-right: none}`.
<img width="1408" height="156" alt="Screenshot without cell right
borders"
src="https://github.com/user-attachments/assets/d4c19bbc-3fd2-4fd1-83a6-1125e953e95b"
/>
<img width="1397" height="158" alt="Screenshot with cell right borders"
src="https://github.com/user-attachments/assets/86aaafcb-d7e8-4228-99a8-7527c823a07c"
/>

Fixes #16559, #30358.

Unfortunately, retaining empty lines is less trivial, so the line
numbers on the leftmost column will still not match the source file
whenever those are present, though a future PR could address that.
2025-09-04 09:54:58 -07:00
..
actions Redirect to a presigned URL of HEAD for HEAD requests (#35088) 2025-07-16 11:22:45 +00:00
activitypub Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
analyze
assetfs Refactor embedded assets and drop unnecessary dependencies (#34692) 2025-06-12 03:59:33 +00:00
auth Fix http auth header parsing (#34936) 2025-07-03 03:02:38 +00:00
avatar Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
badge Add flat-square action badge style (#34062) 2025-04-01 09:42:10 +00:00
base Fix http auth header parsing (#34936) 2025-07-03 03:02:38 +00:00
cache enforce explanation for necessary nolints and fix bugs (#34883) 2025-06-27 21:48:03 +08:00
cachegroup Cache GPG keys, emails and users when list commits (#34086) 2025-04-09 16:34:38 +00:00
charset Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
commitstatus enforce nolint scope (#34851) 2025-06-27 07:59:55 +02:00
container
csv Disable Field count validation of CSV viewer (#35228) 2025-09-04 09:54:58 -07:00
dump Use github.com/mholt/archives replace github.com/mholt/archiver (#35390) 2025-09-01 19:40:12 +00:00
emoji
eventsource
fileicon Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
generate
git Move some functions from package git to gitrepo (#33910) 2025-09-01 19:13:18 +00:00
gitrepo Move some functions from package git to gitrepo (#33910) 2025-09-01 19:13:18 +00:00
globallock Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
graceful Fix context usages (#35348) 2025-08-27 11:00:01 +00:00
gtprof Add start time on perf trace because it seems some steps haven't been recorded. (#35282) 2025-08-18 15:17:19 +00:00
hcaptcha
highlight Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
hostmatcher Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
htmlutil Improve labels-list rendering (#34846) 2025-06-27 23:12:25 +08:00
httpcache Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
httplib Fix context usages (#35348) 2025-08-27 11:00:01 +00:00
indexer Upgrade dependencies (#35384) 2025-09-02 23:13:38 -04:00
issue/template Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
json enforce explanation for necessary nolints and fix bugs (#34883) 2025-06-27 21:48:03 +08:00
label Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
lfs Refactor repo contents API and add "contents-ext" API (#34822) 2025-06-25 02:34:21 +00:00
lfstransfer Fix SSH LFS timeout (#34838) 2025-06-24 15:49:31 +00:00
log enforce explanation for necessary nolints and fix bugs (#34883) 2025-06-27 21:48:03 +08:00
markup Update chroma to v2.20.0 (#35220) 2025-08-11 13:00:20 +02:00
mcaptcha
metrics Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
migration Fix some missed GitHeadRefName when renaming (#35102) 2025-07-17 14:01:11 +00:00
nosql
optional Fix updating user visibility (#35036) 2025-07-10 16:17:28 -07:00
options Refactor embedded assets and drop unnecessary dependencies (#34692) 2025-06-12 03:59:33 +00:00
packages Redirect to a presigned URL of HEAD for HEAD requests (#35088) 2025-07-16 11:22:45 +00:00
paginator
pprof
private Fix a bug when uploading file via lfs ssh command (#34408) 2025-05-09 16:17:08 +00:00
process
proxy
proxyprotocol Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
public Upgrade gopls to v0.19.0, add make fix (#34772) 2025-06-18 19:30:40 +00:00
queue Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
recaptcha
references Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
regexplru Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
repository Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
reqctx Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
secret
session Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
setting Use configurable remote name for git commands (#35172) 2025-08-21 10:14:35 -07:00
sitemap
ssh Update x/crypto package and make builtin SSH use default parameters (#34667) 2025-06-09 19:51:02 +00:00
storage Fix error logs and improve some comments/messages (#35105) 2025-07-17 19:09:54 +08:00
structs Rename UpdateBranch API to RenameBranch API (#35374) 2025-09-01 16:12:05 +00:00
svg
sync
system Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
tailmsg
tempdir Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
templates Move git config/remote to gitrepo package and add global lock to resolve possible conflict when updating repository git config file (#35151) 2025-09-01 18:47:04 +00:00
test Validate hex colors when creating/editing labels (#34623) 2025-06-07 11:25:08 +03:00
testlogger Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
timeutil Refactor embedded assets and drop unnecessary dependencies (#34692) 2025-06-12 03:59:33 +00:00
translation Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
turnstile
typesniffer Add support for 3D/CAD file formats preview (#34794) 2025-06-30 16:12:25 +08:00
updatechecker Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
uri
user
util Fix various bugs (#35177) 2025-07-30 07:08:59 +00:00
validation Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
web Refactor to use reflect.TypeFor (#35370) 2025-08-27 20:13:31 -07:00
webhook Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +08:00
zstd Refactor embedded assets and drop unnecessary dependencies (#34692) 2025-06-12 03:59:33 +00:00