Skip to content

Commit

Permalink
chore: update table alignment (#353)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
jackton1 and github-actions[bot] committed Oct 29, 2022
1 parent 7ec0dd2 commit 1676970
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ Add the `Inputs` and/or `Outputs` [`H2` header](https://github.com/adam-p/markdo

| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|----------------|--------|----------|----------------|-----------------------------------------------------------------------------|
| action | string | false | `"action.yml"` | Path to the action.yml file<br> |
| bin\_path | string | false | | Path to the auto-doc binary<br> |
| col\_max\_width | string | false | `"1000"` | Max width of a column<br> |
| col\_max\_words | string | false | `"5"` | Max number of words per<br>line in a column |
| input\_columns | string | false | | List of Input columns names<br>to display, default (display all<br>columns) |
| output | string | false | `"README.md"` | Path to the output file<br> |
| output\_columns | string | false | | List of Output column names<br>to display, default (display all<br>columns) |
| action | string | false | `"action.yml"` | Path to the action.yml file<br> |
| bin\_path | string | false | | Path to the auto-doc binary<br> |
| col\_max\_width | string | false | `"1000"` | Max width of a column<br> |
| col\_max\_words | string | false | `"5"` | Max number of words per<br>line in a column |
| input\_columns | string | false | | List of Input columns names<br>to display, default (display all<br>columns) |
| output | string | false | `"README.md"` | Path to the output file<br> |
| output\_columns | string | false | | List of Output column names<br>to display, default (display all<br>columns) |

<!-- AUTO-DOC-INPUT:END -->

Expand Down
2 changes: 2 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func (a *Action) renderOutput() error {
inputTable.SetHeader(inputColumns)
inputTable.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
inputTable.SetCenterSeparator(pipeSeparator)
inputTable.SetAlignment(tablewriter.ALIGN_CENTER)

keys := make([]string, 0, len(a.Inputs))
for k := range a.Inputs {
Expand Down Expand Up @@ -192,6 +193,7 @@ func (a *Action) renderOutput() error {
outputTable.SetHeader(outputColumns)
outputTable.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
outputTable.SetCenterSeparator(pipeSeparator)
outputTable.SetAlignment(tablewriter.ALIGN_CENTER)

keys := make([]string, 0, len(a.Outputs))
for k := range a.Outputs {
Expand Down

0 comments on commit 1676970

Please sign in to comment.