Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide border doesn't affect the output once the table has been printed #80

Open
dfalbel opened this issue Feb 7, 2022 · 0 comments
Open

Comments

@dfalbel
Copy link

dfalbel commented Feb 7, 2022

Hello there,

Thanks very much for this library. I'm working on bindings for the R language.
I encountered this behavior where modifying hide_border_bottom() won't modify the output if the table has been printed some time before.

For example:

#include <tabulate/table.hpp>
using namespace tabulate;
using Row_t = Table::Row_t;

int main() {
  Table table;
  table.add_row(Row_t{"hello"});
  table.add_row(Row_t{"world"});

  std::cout << table << std::endl;

  table.format().hide_border_bottom();

  std::cout << table << std::endl;

  table.format().width(50);

  std::cout << table << std::endl;
}

Returns:

+-------+
| hello |
+-------+
| world |
+-------+
+-------+
| hello |
+-------+
| world |
+-------+
+--------------------------------------------------+
| hello                                            |
+--------------------------------------------------+
| world                                            |
+--------------------------------------------------+
@dfalbel dfalbel changed the title Hide border doesn't affect the output once the has been printed Hide border doesn't affect the output once the table has been printed Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant