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

left, right, and center-aligned Markdown tables #53

Closed
tanimislam opened this issue Apr 25, 2020 · 4 comments · Fixed by RaSan147/python-tabulate#11
Closed

left, right, and center-aligned Markdown tables #53

tanimislam opened this issue Apr 25, 2020 · 4 comments · Fixed by RaSan147/python-tabulate#11
Labels
enhancement New feature or request

Comments

@tanimislam
Copy link

tanimislam commented Apr 25, 2020

I realize that Markdown is a mess, but for tablefmt="github" with stralign argument, the header line (which goes as -----------) can be modified as the following:

  • stralign="left": header lines will have :---------.
  • stralign="right": header lines will have ---------:.
  • stralign="center": header lines have :--------:.
@astanin astanin added the enhancement New feature or request label Feb 20, 2021
@samueljsb
Copy link

I just had a look at implementing this and realised that this is exactly what the 'pipe' format does. The README even points out that the 'github' format is the 'pipe' format without alignment markers, although I missed that the first time I read through the patterns.

@kdeldycke
Copy link
Contributor

Had the same issue trying to produce a GitHub table with alignment directives. I ended up with a workaround to emulate that behavior. For reference, my hackish code is available at: https://github.com/kdeldycke/meta-package-manager/blob/af261b7194c592bbd45a6910bed8063fa6c59fbe/meta_package_manager/inventory.py#L56-L87

kdeldycke added a commit to kdeldycke/python-tabulate that referenced this issue Apr 4, 2023
kdeldycke added a commit to kdeldycke/python-tabulate that referenced this issue Apr 4, 2023
@kdeldycke
Copy link
Contributor

For reference, I proposed a PR to address this issue at: #261

kdeldycke added a commit to kdeldycke/python-tabulate that referenced this issue Apr 4, 2023
kdeldycke added a commit to kdeldycke/python-tabulate that referenced this issue Apr 4, 2023
@astanin
Copy link
Owner

astanin commented Sep 27, 2024

I suppose this feature is now covered by colon_grid format, pull request #341

@astanin astanin closed this as completed Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants