Skip to content

Commit

Permalink
eliminate redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
cicirello committed Jul 25, 2022
1 parent 63261fd commit 34e1e20
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions generatesitemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,7 @@ def urlstring(f, baseUrl, dropExtension=False) :
u = f[1:]
else :
u = f
if len(u) >= 11 and u[-11:] == "/index.html" :
u = u[:-10]
elif u == "index.html" :
u = ""
elif dropExtension and len(u) >= 5 and u[-5:] == ".html" :
u = u[:-5]
u = sortname(u, dropExtension)
if len(u) >= 1 and u[0]=="/" and len(baseUrl) >= 1 and baseUrl[-1]=="/" :
u = u[1:]
elif (len(u)==0 or u[0]!="/") and (len(baseUrl)==0 or baseUrl[-1]!="/") :
Expand Down

0 comments on commit 34e1e20

Please sign in to comment.