v1.0 Release – Further Improving Bug Functionality for the OnScroll Patch

In my earlier blog post I outlined that I wanted to further improve bug functionality for the OnScroll patch. Bugs that were only 5 digits long were not being converted into proper links. For example bug 12345 or b#12345 or 12345. I was only covering bugs that were 6 digits in length. The following is my old bug regexps:

re = new RegExp("[bB][uU][gG]\s\d{6}");
re2 = new RegExp("b=\d{6}");
re3 = new RegExp("\d{6}\W");

Now have a look at my new bug regexes:

re = new RegExp('[bB][uU][gG]sd{5,}');
re2 = new RegExp('b=d{5,}');
re3 = new RegExp('d{5,}W');

As you can see the regexp implementation hasn’t changed very much. The only change was that ’6′ became ’5,’ and now the 5 digit bugs are converted into bug links properly. Basically ’5,’ specifies that anything >=5 digits should be converted into bug links. Furthermore, 7 digit bugs will start to appear eventually (if they haven’t already, not sure). This implementation automatically takes care of that situation.

Another thing you will notice in my new implementation is that the regexps no longer use double quotes. Instead, I’m now using single quotes which means that I don’t need to use the double backward slash as an escape character.

This entry was posted in DPS911, Mercurial Project, Open Source and tagged , , . Bookmark the permalink.

2 Responses to v1.0 Release – Further Improving Bug Functionality for the OnScroll Patch

  1. There are still 3- and 4-digit bugs open. Is there a reason that you’re not trying to take those into account?

  2. tv ally says:

    Nice site. I just bookmarked you on my bloglines.

    Sent from my iPhone 4G

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>