]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix to the changelog system for when there's no change recs in the body
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 27 Oct 2013 22:25:47 +0000 (18:25 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 27 Oct 2013 22:26:30 +0000 (18:26 -0400)
doc/build/builder/changelog.py

index f96fd559e64db386c8fc1be804d529e478940bd6..811ad943441513a9595effa48fbc91ecfdcdacb2 100644 (file)
@@ -151,10 +151,14 @@ class ChangeLogDirective(EnvDirective, Directive):
             topsection.append(nodes.Text("no release date"))
 
         intro_para = nodes.paragraph('', '')
+        len_ = -1
         for len_, text in enumerate(self._parsed_content['text']):
             if ".. change::" in text:
                 break
-        if len_:
+
+        # if encountered any text elements that didn't start with
+        # ".. change::", those become the intro
+        if len_ > 0:
             self.state.nested_parse(self._parsed_content['text'][0:len_], 0,
                             intro_para)
             topsection.append(intro_para)