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
F15532236: D18140.id43643.diff
Wed, Apr 23, 2:59 PM
F15529570: D18140.id43646.diff
Tue, Apr 22, 8:54 PM
F15526526: D18140.id43643.diff
Mon, Apr 21, 9:16 PM
F15516268: D18140.id.diff
Fri, Apr 18, 5:35 PM
F15513799: D18140.diff
Thu, Apr 17, 9:57 PM
F15512212: D18140.diff
Thu, Apr 17, 8:49 AM
F15441801: D18140.id43646.diff
Wed, Mar 26, 8:00 PM
F15328304: D18140.diff
Mar 7 2025, 5:30 AM
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
Branch
emptyrow
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 17535
Build 23528: Run Core Tests
Build 23527: arc lint + arc unit

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.