We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc87f4a commit 054f809Copy full SHA for 054f809
sphinxcontrib/confluencebuilder/util.py
@@ -79,12 +79,12 @@ def normalize_base_url(url):
79
if url:
80
# removing any trailing forward slash user provided
81
if url.endswith('/'):
82
- url = url[:-1]
+ url = url.removesuffix('/')
83
# check for rest api prefix; strip and return if found
84
if url.endswith(API_REST_V1):
85
- url = url[:-len(API_REST_V1)]
+ url = url.removesuffix(API_REST_V1)
86
if url.endswith(API_REST_V2):
87
- url = url[:-len(API_REST_V2)]
+ url = url.removesuffix(API_REST_V2)
88
# restore trailing forward flash
89
elif not url.endswith('/'):
90
url += '/'
0 commit comments