From c8368d9b2fad3f0a3ebb86ebd692a6fe08b45027 Mon Sep 17 00:00:00 2001 From: The Wobbler Date: Thu, 10 Apr 2025 10:40:01 +0200 Subject: [PATCH] Fixed an url correction. --- omg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omg.py b/omg.py index 14ecea6..14a6c79 100755 --- a/omg.py +++ b/omg.py @@ -160,7 +160,7 @@ class OMG: url = url.split()[0] link = url.split("/")[-1].strip() - relpath = os.path.relpath(os.path.join(path, "../" + url), self.path).strip() + relpath = os.path.relpath(os.path.join(path, "../" + url.strip()), self.path) if not relpath.endswith(".md"): relpath += ".md" @@ -184,9 +184,9 @@ class OMG: link = tokens[0].split("/")[-1].strip().replace("\\", "") relpath = os.path.relpath( - os.path.join(path, "../" + tokens[0]), + os.path.join(path, "../" + tokens[0].strip().replace("\\", "")), self.path - ).strip().replace("\\", "") + ) if not relpath.endswith(".md"): relpath += ".md"