Skip to content

Commit

Permalink
Fix a bug in convert_md_to_rst() in text.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeqfu committed Apr 12, 2021
1 parent 82aefd8 commit a8dc317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyhelpers/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ def convert_md_to_rst(path_to_md, path_to_rst, verbose=False, pandoc_exe=None, *
# assert abs_md_path.suffix == ".md" and abs_rst_path.suffix == ".rst"

if verbose:
rel_md_path = abs_md_path.relative_to(abs_md_path.cwd())
rel_rst_path = abs_rst_path.relative_to(abs_rst_path.cwd())
rel_md_path = pathlib.Path(os.path.relpath(abs_md_path))
rel_rst_path = pathlib.Path(os.path.relpath(abs_rst_path))
if not os.path.exists(abs_rst_path):
print("Converting \"{}\" to \"{}\"".format(rel_md_path, rel_rst_path), end=" ... ")
else:
Expand Down

0 comments on commit a8dc317

Please sign in to comment.