[FIX] conf: avoid // urls

e.g. https://www.odoo.com/documentation/user/13.0//crm.html when
creating link with no branch/lang name
This commit is contained in:
Martin Trigaux 2019-12-10 16:42:25 +01:00
parent 1f51fda2e8
commit b1dabedf81

View File

@ -411,6 +411,8 @@ def localize(app, pagename, templatename, context, doctree):
def _build_url(root, branch, pagename):
if not branch:
root = root.rstrip('/')
return "{canonical_url}{canonical_branch}/{canonical_page}".format(
canonical_url=root,
canonical_branch=branch,