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

The table formatter does not respect alignment! #6

Closed
harshcurious opened this issue Jun 22, 2021 · 2 comments
Closed

The table formatter does not respect alignment! #6

harshcurious opened this issue Jun 22, 2021 · 2 comments

Comments

@harshcurious
Copy link

The table formatter does not respect alignment specified.

Just try and align the following table:

| A   | B   | C   | D   |
| --- | ---: | :---: | :--- |
| dhdhgfgh | dsgsdgdg | dsgsdfg | zxczc |

You will get the following (which is not a table according to markdown syntax):

| A        | B        | C       | D     |
|----------|----:-----|-:---:---|-:-----|
| dhdhgfgh | dsgsdgdg | dsgsdfg | zxczc |

I should have got:

| A        | B        | C       | D     |
|----------|---------:|:-------:|:------|
| dhdhgfgh | dsgsdgdg | dsgsdfg | zxczc |
@roman-r-m
Copy link
Owner

Just pushed a new version 1.2.0 that mostly fixes this issue. However the lib I am using seems to have a bug and can't deal with tables having leading/trailing spaces in the 2nd line as in your example. I've raised it on their repo.
For now, changing your example to

| A   | B   | C   | D   |
|---|---:|:---:|:---|
| dhdhgfgh | dsgsdgdg | dsgsdfg | zxczc |

should give correct result.

@roman-r-m
Copy link
Owner

Fixed in 1.2.1 which should be available shortly.

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

2 participants