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

Make printed table markdown-friendly #78

Merged
merged 1 commit into from Jul 6, 2022
Merged

Make printed table markdown-friendly #78

merged 1 commit into from Jul 6, 2022

Conversation

rhoboat
Copy link
Contributor

@rhoboat rhoboat commented Jun 24, 2022

Description

This change uses different characters for the pipe and hyphen when printing tables and removes the top and bottom borders.

Not sure if this makes sense to all users. The table may not look as nice in the CLI, but it can be more easily copy-pasted into GitHub issues/PRs and other markdown needs. It doesn't seem worth having a separate --render-markdown flag.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Updated the table outputs to be markdown friendly.

Migration Guide

(I don't think this warrants a migration guide even though changes are made to outputs.)

printer.BorderTop, printer.BorderBottom, printer.BorderLeft, printer.BorderRight = false, false, true, true
printer.CenterSeparator = "|"
printer.ColumnSeparator = "|"
printer.RowSeparator = "-"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we just use different characters because of our different operating systems, but I always have to sed these manually.

Copy link
Contributor

@zackproser zackproser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rhoboat rhoboat merged commit 9464c8e into master Jul 6, 2022
@rhoboat rhoboat deleted the markdown-tables branch July 6, 2022 15:09
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

Successfully merging this pull request may close these issues.

None yet

2 participants