fix JIRA unit test -- $ in title

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16116 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
huybrechts committed 2009-03-08 21:44:29 +00:00
1 parent 2935258e91
commit dd5335ab19
1 file changed
+10 -5
+10 -5
View File
@@ -171,13 +171,18 @@ public class MarkupText extends AbstractMarkupText {
} else if (ch == '$') {// replace by group
i++;
ch = s.charAt(i);
// get the group number
int groupId = s.charAt(i) - '0';
int groupId = ch - '0';
if (groupId < 0 || groupId > 9) {
buf.append('$').append(ch);
} else {
// add the group text
String group = group(groupId);
if (group != null)
buf.append(group);
}
// add the group text
String group = group(groupId);
if (group != null)
buf.append(group);
} else {
// other chars
buf.append(ch);