From 0683e955e0874b496b88d9f95e22fdea7a158954 Mon Sep 17 00:00:00 2001 From: Joel Nothman Date: Tue, 12 Jun 2018 14:06:25 +1000 Subject: [PATCH] FIX pedantic handling of whitespace in reference regex --- numpydoc/numpydoc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/numpydoc/numpydoc.py b/numpydoc/numpydoc.py index 763c022d..9536b276 100644 --- a/numpydoc/numpydoc.py +++ b/numpydoc/numpydoc.py @@ -50,7 +50,8 @@ def rename_references(app, what, name, obj, options, lines): references = set() for line in lines: line = line.strip() - m = re.match(sixu('^.. \\[(%s)\\]') % app.config.numpydoc_citation_re, + m = re.match(sixu(r'^\.\. +\[(%s)\]') % + app.config.numpydoc_citation_re, line, re.I) if m: references.add(m.group(1))