Page MenuHomePhabricator

Make empty Remarkup table rows have more intuitive behavior
ClosedPublic

Authored by epriestley on Jun 19 2017, 10:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 3:35 PM
Unknown Object (File)
Mon, Apr 1, 5:14 AM
Unknown Object (File)
Fri, Mar 29, 2:54 AM
Unknown Object (File)
Mar 5 2024, 6:14 AM
Unknown Object (File)
Feb 3 2024, 4:16 PM
Unknown Object (File)
Jan 10 2024, 7:10 AM
Unknown Object (File)
Jan 7 2024, 8:24 PM
Unknown Object (File)
Jan 4 2024, 4:33 PM
Subscribers
None

Details

Summary

Fixes T12849. Currently, when a row contains only empty cells and cells with "----" in them, we treat it as indicating which cells above should be rendered with <th /> instead of <td />.

This produces an unintuitive result when every cell is empty.

Instead, treat a row as a "headings" row only if it has at least one "---" cell in it.

Test Plan

Added a unit test.

Note that the resulting row is empty, so it doesn't get normal line height.

Screen Shot 2017-06-19 at 3.20.08 PM.png (517×353 px, 22 KB)

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Specifically, the old syntax supports this:

| !!Things!! | Big | Small |
| |--|--|
| Left | Yes | Maybe
| -- |
| Right | No | Sometimes |
| -- |

...to produce this:

ThingsBigSmall
LeftYesMaybe
RightNoSometimes
This revision is now accepted and ready to land.Jun 20 2017, 3:38 AM
This revision was automatically updated to reflect the committed changes.