From a09c17080841ce8f299c814e0307fec32794ebe1 Mon Sep 17 00:00:00 2001 From: Keewis Date: Fri, 31 Jul 2020 19:16:13 +0200 Subject: [PATCH] skip whitespace only tokens --- sphinx/ext/napoleon/docstring.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index ee4df271c..36c713170 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -810,6 +810,9 @@ def _recombine_set_tokens(tokens: List[str]) -> List[str]: previous_token = token continue + if not token.strip(): + continue + if token in keywords: tokens.appendleft(token) if previous_token is not None: