kenan238 / reblessed

A high-level terminal interface library for node.js.
MIT License
87 stars 10 forks source link

Add table border options #23

Closed markabrahams closed 10 months ago

markabrahams commented 10 months ago

This is a PR that implements #22, with the "tableBorder" option structure outlined there.

I elected to refactor the Table.prototype.render function to make a single control loop that renders table border rows sequentially from the top down, whether they are pure "border" rows or the border parts of the "content" rows. With the slew of new border options, having these two "border" and "content" row renderings separate - as the code was previously - became difficult to understand, was difficult to implement correctly, and would have been difficult to manage going forward.

kenan238 commented 10 months ago

Seems to work (checked on mobile)