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

Automatically Infer table headers #92

Open
Mr0grog opened this issue Aug 21, 2023 · 0 comments
Open

Automatically Infer table headers #92

Mr0grog opened this issue Aug 21, 2023 · 0 comments
Labels
enhancement New feature or request input cleanup Features to take bad input and produce better output

Comments

@Mr0grog
Copy link
Owner

Mr0grog commented Aug 21, 2023

With well formed tables, Google Docs outputs nice <thead> and <tbody> markup we use to create nice Markdown tables. However, people frequently format header rows visually as headers but fail to actually make them headers in Google Docs (the table at the bottom of. this doc is an example, as of 2023-08-21: https://docs.google.com/document/d/1Voa0_i1q8ZCtQkNPPJiNFqy7vhmTzGPthOFRfr4Ledw/edit), which results in disappointing Markdown output where the headers are not headers:

|                    |                |                    |                                                |
| :----------------: | :------------: | :----------------: | :--------------------------------------------: |
| **VERSION NUMBER** | **REVISED BY** | **EFFECTIVE DATE** |      **DESCRIPTION OF CHANGES**                |
|        1.0.0       | City CIO       |      7/14/2023     | First detailed version of DoIT Strategic Plan  |
|                    |                |                    |                                                |
|                    |                |                    |                                                |

It would be nice use some heuristics to detect this scenario and automatically correct it. Some ideas:

  • All values for a particular column are numeric except the first row.
  • All rows have the same alignment for each column except the first row.
  • First row has a background color on all cells, and no other rows have that background.
  • First row is all bold, no other rows are.
@Mr0grog Mr0grog added enhancement New feature or request input cleanup Features to take bad input and produce better output labels Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request input cleanup Features to take bad input and produce better output
Projects
None yet
Development

No branches or pull requests

1 participant