From 2a8ebc4411deacb6eeac5d4cb6f9568d61ac6a12 Mon Sep 17 00:00:00 2001 From: Grey Li Date: Thu, 1 Aug 2019 22:49:31 +0800 Subject: [PATCH 1/2] Fix github link generator for docs --- docs/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 9fe9d985..99fe52aa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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) From 28ffe153490c2a58919835bf0f9828958795871f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Csirmaz=20Bendeg=C3=BAz?= Date: Tue, 30 Jul 2019 14:45:06 +0200 Subject: [PATCH 2/2] Fix typo in urlprocessors.rst --- docs/patterns/urlprocessors.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/patterns/urlprocessors.rst b/docs/patterns/urlprocessors.rst index 3f65d758..0d743205 100644 --- a/docs/patterns/urlprocessors.rst +++ b/docs/patterns/urlprocessors.rst @@ -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'``::