fix: string handling for file path in markdown previews for legacy Python versions
Ensured string handling for file paths in markdown previews uses consistent single quotes to prevent syntax errors.
This commit is contained in:
parent
ccd4a1cb77
commit
69a278de6e
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ def preview_file(owner: str, repo: str, file_path: str):
|
|||
is_safe = False
|
||||
|
||||
if content_type == "text/markdown":
|
||||
base_url = f"/{owner}/{repo}/raw/main/{"/".join(file_path.split("/")[:-1])}".rstrip(
|
||||
base_url = f"/{owner}/{repo}/raw/main/{'/'.join(file_path.split('/')[:-1])}".rstrip(
|
||||
"/"
|
||||
)
|
||||
file_content = RelativeURLRewriter(base_url).convert(
|
||||
|
|
Loading…
Reference in a new issue