mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-08 07:05:28 +02:00
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.