Loading
Preserve table sections through rich text saves
What does this MR do and why?
Preserve declared table sections during rich-text saves, fixing lost sorting after editing HTML tables.
- Retain header, body, and footer row groups.
- Keep inserted and pasted rows in the body.
- Preserve merged-cell layout when a rowspan crosses row groups.
- Leave unsupported complex tables intact instead of dropping content during enhancement.
- Keep single-cell copying compatible with section wrappers.
Scope: HTML/Markdown normalization still occurs. This preserves table semantics, not byte-for-byte source formatting. The reported historical content loss was not reproduced; inspecting the original description versions did not establish its cause.
References
- Addresses #621749
- Prerequisite for GA: !254744 (merged)
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Enable
Feature.enable(:markdown_sortable_table_columns)in the Rails console. - Save the issue's HTML sample in a wiki page using plain-text mode.
- Reopen in rich text, append
ZZTESTto the first cell, and save. - Reopen, edit again, and save directly from rich text.
- Confirm all markers and the details block remain. Sort the rendered table in both directions.
Observed: all 12 markers, one details block, and three sortable headers survive repeated saves. Before the fix, the sample loses its header section and sorting controls.
MR acceptance checklist
Evaluated against the MR acceptance checklist.
Edited by Vanessa Otto

