Commits

Jason R. Coombs committed e764f52

Extract another function for constructing linkified changes

Comments (0)

Files changed (1)

     from distribute_setup import _before_install
     _before_install()
 
-# return contents of reStructureText file with linked issue references
 def _linkified(rst_path):
-    bitroot = 'http://bitbucket.org/tarek/distribute'
-    revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I)
-
+    "return contents of reStructureText file with linked issue references"
     rst_file = open(rst_path)
     rst_content = rst_file.read()
     rst_file.close()
 
+    return _linkified_text(rst_content)
+
+def _linkified_text(rst_content):
+    bitroot = 'http://bitbucket.org/tarek/distribute'
+    revision = re.compile(r'\b(issue\s+#?\d+)\b', re.M | re.I)
+
     anchors = revision.findall(rst_content) # ['Issue #43', ...]
     anchors = sorted(set(anchors))
     rst_content = revision.sub(r'`\1`_', rst_content)