Skip to content

Commit

Permalink
fix join
Browse files Browse the repository at this point in the history
  • Loading branch information
areibman committed Sep 24, 2024
1 parent d9d6790 commit 1c7edf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spellcaster/grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def display_results(response: Grammar, path: str, repo_link: str = ""):
parts = os.path.normpath(response.file_path).split(os.path.sep)
if "samples" in parts:
index = parts.index("samples")
relative_path = os.path.sep.join(parts[index+1:])
relative_path = os.path.join(*parts[index+1:])
path = f"{repo_link.rstrip('/')}/blob/main/{relative_path}"
else:
# Fallback if 'samples' is not in the path
Expand Down

0 comments on commit 1c7edf0

Please sign in to comment.