Commits

pv  committed c311d97

autosummary: fix parsing in generate

  • Participants
  • Parent commits edec5eb

Comments (0)

Files changed (1)

File sphinx/ext/autosummary/generate.py

     *template* ``None`` if the directive does not have the
     corresponding options set.
     """
-    autosummary_re = re.compile(r'^\.\.\s+autosummary::\s*')
-    automodule_re = re.compile(r'.. automodule::\s*([A-Za-z0-9_.]+)\s*$')
-    module_re = re.compile(r'^\.\.\s+(current)?module::\s*([a-zA-Z0-9_.]+)\s*$')
+    autosummary_re = re.compile(r'^\s*\.\.\s+autosummary::\s*')
+    automodule_re = re.compile(r'^\s*\.\.\s+automodule::\s*([A-Za-z0-9_.]+)\s*$')
+    module_re = re.compile(r'^\s*\.\.\s+(current)?module::\s*([a-zA-Z0-9_.]+)\s*$')
     autosummary_item_re = re.compile(r'^\s+([_a-zA-Z][a-zA-Z0-9_.]*)\s*.*?')
     toctree_arg_re = re.compile(r'^\s+:toctree:\s*(.*?)\s*$')
     template_arg_re = re.compile(r'^\s+:template:\s*(.*?)\s*$')