Preserve Pipe Table column width in markdown to markdown conversion? #9464
Unanswered
dude-at-RA
asked this question in
Q&A
Replies: 1 comment
-
This is as documented. Relative column widths for pipe tables are only generated if the source of the table is longer than You can of course make any table wider than |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As part of a document transformation, we do a markdown to markdown conversion to insert yaml metadata into the markdown content of a document before eventually converting that new markdown to html.
In the grand sense, I want to preserve column widths as defined in pipe tables in markdown all the way through to the table colgroup / col style assignments in html.
The first step of that is to understand how to preserve pipe table column widths in a markdown to markdown conversion.
Converting this sample markdown
using this command:
yields this output:
As I've learned through experimentation, table output behavior is heavily dependent on the
wrap
andcolumns
options - and can affect the output of tables longer than the column size but not things shorter. Also, the overall table width is dependent on the contents of all the cells. In the example above, playing around withwrap
andcolumns
have different effects, but none of them result in something close to what I'm looking for: to preserve the relative column width ratios as defined in the second line of a pipe table through a transformation of markdown to markdown.Is there a way to do this?
Also, if it helps, the second stage markdown doesn't have to be human readable as it is 'in process' during our transformations. If there is another table format that can preserve those column width percentages, I'd be fine with that.
Thanks for the input!
Beta Was this translation helpful? Give feedback.
All reactions