Mike Bayer committed 604f6df

add support for an intro paragraph

Comments (0)

Files changed (1)

-__version__ = '0.1.1'
+__version__ = '0.2.0'
 import re
 from sphinx.util.compat import Directive
 from docutils.statemachine import StringList
-from docutils import nodes
+from docutils import nodes, utils
 import textwrap
 import itertools
 import collections
     d = {}
     d['text'] = []
     idx = 0
-    for idx, line in enumerate(content):
+    for line in content:
+        idx += 1
         m = re.match(r' *\:(.+?)\:(?: +(.+))?', line)
         if m:
             attrname, value =, 2)
             topsection.append(nodes.Text("no release date"))
+        intro_para = nodes.paragraph('', '')
+        for len_, text in enumerate(self._parsed_content['text']):
+            if ".. change::" in text:
+                break
+        if len_:
+            self.state.nested_parse(self._parsed_content['text'][0:len_], 0,
+                            intro_para)
+            topsection.append(intro_para)
         return topsection
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.