Skip to content

Commit

Permalink
Use Python facilities to convert paths to file:// urls
Browse files Browse the repository at this point in the history
  • Loading branch information
I-Al-Istannen committed Nov 14, 2024
1 parent 287173b commit 2e79cf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ ambiguous situations.

## Unreleased

## Fixed
- File links in report on Windows

## 3.7.0 - 2024-11-13

### Added
Expand Down
2 changes: 1 addition & 1 deletion PFERD/pferd.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def print_report(self) -> None:

def fmt_path_link(relative_path: PurePath) -> str:
# We need to URL-encode the path because it might contain spaces or special characters
link = f"file://{quote(str(crawler.output_dir.resolve(relative_path).absolute()))}"
link = crawler.output_dir.resolve(relative_path).absolute().as_uri()
return f"[link={link}]{fmt_path(relative_path)}[/link]"

something_changed = False
Expand Down

0 comments on commit 2e79cf5

Please sign in to comment.