Ezio Melotti committed eea8386

#494: fix wrong linkification and update tests.

  • Participants
  • Parent commits e783166

Comments (0)

Files changed (3)

File extensions/

 # if the issue number is too big the db will explode -- limit it to 7 digits
-issue_re = re.compile(r'(?P<text>(\#|\b(?<!/)issue)\s*(?P<id>1?\d{1,6}))\b', re.I)
+issue_re = re.compile(r'(?P<text>(\#|\b(?<![-/_])issue)\s*(?P<id>1?\d{1,6}))\b', re.I)
 class PyDevStringHTMLProperty(StringHTMLProperty):

File extensions/test/local_replace_data.txt

 see <a href=""></a>
 see <a href=""></a>
+<a href=""></a>
 ## tracebacks
 File "/usr/lib/python2.7/", line 553, in create_connection
 see the devguide.
 see the <a href="">devguide</a>.
-see <a href=""></a>
+see <a href=""></a>.
 see devguide/triaging.
 see <a href="">devguide/triaging</a>.
 see devguide/triaging.html.

File extensions/test/

 if len(sys.argv) != 2:
     sys.exit('Error: You have to provide the path of Roundup in order to run '
-             'the tests (e.g. /opt/tracker-roundup/lib/python2.6/site-packages/).')
+             'the tests (e.g. /opt/tracker-roundup/lib/python2.7/site-packages/).')
 # add to sys.path the dir where roundup is installed (local_replace will try
 # to import it)
 # add the dir where local_replace is (i.e. one level up)
 # add the dir where the roundup tests are
-sys.path.append(os.path.sep.join(dirs[:-4] + ['roundup-src', 'test']))
+sys.path.append(os.path.sep.join(dirs[:-3] + ['roundup', 'test']))
 from local_replace import PyDevStringHTMLProperty