Merge branch '1.1.x'

This commit is contained in:
David Lord 2019-08-01 13:08:34 -07:00
commit 0adbaf270a
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
2 changed files with 5 additions and 3 deletions

View file

@ -1,3 +1,5 @@
import packaging
from pallets_sphinx_themes import get_version
from pallets_sphinx_themes import ProjectLink
@ -74,7 +76,7 @@ def github_link(name, rawtext, text, lineno, inliner, options=None, content=None
else:
words = None
if release.endswith("dev"):
if packaging.version.parse(release).is_devrelease:
url = "{0}master/{1}".format(base_url, text)
else:
url = "{0}{1}/{2}".format(base_url, release, text)

View file

@ -39,8 +39,8 @@ generate URLs from one function to another you would have to still provide
the language code explicitly which can be annoying.
For the latter, this is where :func:`~flask.Flask.url_defaults` functions
come in. They can automatically inject values into a call for
:func:`~flask.url_for` automatically. The code below checks if the
come in. They can automatically inject values into a call to
:func:`~flask.url_for`. The code below checks if the
language code is not yet in the dictionary of URL values and if the
endpoint wants a value named ``'lang_code'``::