Skip to content

Commit 4105737

Browse files
committed
fix: Correct output file path generation in BBCode conversion
1 parent 8b05c2c commit 4105737

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

markdown_to_bbcode.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,10 @@ def generate_output_filename(input_file, bbcode_type, output_folder):
275275
Returns:
276276
str: Generated output file path.
277277
"""
278+
folder = os.path.dirname(input_file)
278279
base = os.path.splitext(os.path.basename(input_file))[0]
279280
output_filename = f"{base}.{bbcode_type}"
280-
return os.path.join(output_folder, output_filename)
281+
return os.path.join(folder, output_folder, output_filename)
281282

282283
def get_repo_name():
283284
"""

0 commit comments

Comments
 (0)