mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-26 07:18:31 +01:00
dvc: add trailing newline in --show-md (#4124)
To finalize md table. Fixes #4123
This commit is contained in:
+7
-1
@@ -91,7 +91,7 @@ def table(header, rows, markdown=False):
|
||||
if not rows and not markdown:
|
||||
return ""
|
||||
|
||||
return tabulate(
|
||||
ret = tabulate(
|
||||
rows,
|
||||
header,
|
||||
tablefmt="github" if markdown else "plain",
|
||||
@@ -100,6 +100,12 @@ def table(header, rows, markdown=False):
|
||||
missingval="None",
|
||||
)
|
||||
|
||||
if markdown:
|
||||
# NOTE: md table is incomplete without the trailing newline
|
||||
ret += "\n"
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
def format_dict(d):
|
||||
ret = {}
|
||||
|
||||
Reference in New Issue
Block a user