You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For those of us who are already using this gem and don't want to install yet another dependency like markdown-tables just to get a more concise API for generating Markdown tables.
Thanks to this library's configurability, you can already format your tables as Markdown format:
markdown_style={border_top: false,border_bottom: false,border_x: "-",border_y: "|",border_i: "|"}putsTerminal::Table.new(headings: ['heading A','heading B'],rows: [['a','b'],['a','b']],style: markdown_style)
| headingA | headingB |
|-----------|-----------|
| a | b |
| a | b |
But it would be nice if we end-users didn't have to copy and paste that big markdown_style hash every place we wanted to output a table in Markdown format.
How about something like:
Terminal::Table.new(...).as_markdown
that would automatically add style: markdown_style for you?
(In the future, we might consider making it do other things, too, like optionally escaping cell content if it contained any text that might be accidentally interpreted as Markdown format.)
For those of us who are already using this gem and don't want to install yet another dependency like
markdown-tables
just to get a more concise API for generating Markdown tables.Thanks to this library's configurability, you can already format your tables as Markdown format:
But it would be nice if we end-users didn't have to copy and paste that big
markdown_style
hash every place we wanted to output a table in Markdown format.How about something like:
that would automatically add
style: markdown_style
for you?(In the future, we might consider making it do other things, too, like optionally escaping cell content if it contained any text that might be accidentally interpreted as Markdown format.)
(See also #106)
The text was updated successfully, but these errors were encountered: