Bug 509901 - Wrong rendering of tables in man pages
Summary: Wrong rendering of tables in man pages
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: default (other bugs)
Version First Reported In: 25.08.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-24 22:19 UTC by nilskemail+kde
Modified: 2025-11-07 12:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Screenshot of the wrongly rendered table (127.76 KB, image/png)
2025-09-24 22:19 UTC, nilskemail+kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nilskemail+kde 2025-09-24 22:19:57 UTC
Created attachment 185231 [details]
Screenshot of the wrongly rendered table

SUMMARY
Some tables in man pages are rendered wrong after the HTML conversion

STEPS TO REPRODUCE
1. Open man:systemd.exec(5)
2. Go to "Table 6. Summary of possible service result variable values"

OBSERVED RESULT
The "watchdog" cell in the leftmost column is two rows high and the rightmost column has an empty cell

EXPECTED RESULT
The "watchdog" cell should span three rows thus pushing the row below one to the right and filling the empty cell

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
Kernel Version: 6.16.7-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840U w/ Radeon  780M Graphics
Memory: 32 GiB of RAM (27.2 GiB usable)
Graphics Processor: AMD Radeon 780M Graphics

ADDITIONAL INFORMATION
Comment 1 nilskemail+kde 2025-09-24 22:31:16 UTC
Opening this as "kate man:/systemd.exec" I was able to confirm that the rowspan HTML attribute is not correctly calculated (it is 2 but should be 3)
Comment 2 Bug Janitor Service 2025-09-26 22:17:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kio-extras/-/merge_requests/468
Comment 3 Albert Astals Cid 2025-11-07 12:12:11 UTC
Git commit d95236c45ad993da27be1a0ace809f8205587404 by Albert Astals Cid.
Committed on 07/11/2025 at 10:24.
Pushed by aacid into branch 'master'.

man2html: Fix calculating rowspan

The old code rowspan was at most ever 2 since we're going back in rows
and doing ++ to the previous row when we find a ^

The fix is to not do ++ to the previous row but to set the previous row
rowspan to the current row rowspan + 1, this way we can accummulate
rowspan as needed

M  +1    -1    man/man2html.cpp

https://invent.kde.org/network/kio-extras/-/commit/d95236c45ad993da27be1a0ace809f8205587404