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

table_mode_align_char doesn't work with multi-line headers #203

Open
comex opened this issue Jul 13, 2021 · 1 comment
Open

table_mode_align_char doesn't work with multi-line headers #203

comex opened this issue Jul 13, 2021 · 1 comment

Comments

@comex
Copy link

comex commented Jul 13, 2021

Suppose I make a table with a right alignment marker in the second column:

| first thing | second thing |
|-------------+-------------:|
| 1           |      2       |

If I run :TableModeRealign, the second column is right-aligned as expected:

| first thing | second thing |
|-------------+-------------:|
| 1           |            2 |

But if I use multiple lines in the header:

| first | second |
| thing | thing  |
|-------+-------:|
| 1     |   2    |

then run :TableModeRealign, I instead get left alignment:

| first | second |
| thing | thing  |
|-------+-------:|
| 1     | 2      |

This seems to be caused by the interaction of tablemode#align#Align and tablemode#align#alignments, together assuming a border line will appear after the first text line.

@dhruvasagar
Copy link
Owner

You're right, multi-line headers aren't fully supported yet. However, I will take another look at it and it should be easy to support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants