Skip to content

Commit

Permalink
refactor: add tester to md_to_py.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mecaneer23 committed Jan 26, 2024
1 parent c7d62e8 commit f3da426
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/md_to_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,16 @@ def md_table_to_lines(
return lines


# Join the lines together into a list of formatted strings
return _to_lines_join(split_lines, columns)
if __name__ == "__main__":
print(_get_column_widths("| Flag | Description |"))
for line in md_table_to_lines(130, 137, "md_to_py.py", ("*",)):
pass
_ = """
| Flag | Description |
| --------------- | ------------------------------- |
| **-h** | Display help message |
| **-v** | Enable verbose output |
| **-f** FILENAME | Specify input file |
| **-o** FILENAME | Specify output file |
| **-n** | Do not overwrite existing files |
"""

0 comments on commit f3da426

Please sign in to comment.