OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 if (0 < n && n < m) { | 297 if (0 < n && n < m) { |
298 addCaptureString(builder, matchInfo, n); | 298 addCaptureString(builder, matchInfo, n); |
299 } else { | 299 } else { |
300 // Because of the captures range check in the parsing of two | 300 // Because of the captures range check in the parsing of two |
301 // digit capture references, we can only enter here when a | 301 // digit capture references, we can only enter here when a |
302 // single digit capture reference is outside the range of | 302 // single digit capture reference is outside the range of |
303 // captures. | 303 // captures. |
304 builder.add('$'); | 304 builder.add('$'); |
305 --position; | 305 --position; |
306 } | 306 } |
| 307 } else { |
| 308 builder.add('$'); |
307 } | 309 } |
308 } else { | 310 } else { |
309 builder.add('$'); | 311 builder.add('$'); |
310 } | 312 } |
311 | 313 |
312 // Go the the next $ in the string. | 314 // Go the the next $ in the string. |
313 next = %StringIndexOf(string, '$', position); | 315 next = %StringIndexOf(string, '$', position); |
314 | 316 |
315 // Return if there are no more $ characters in the string. If we | 317 // Return if there are no more $ characters in the string. If we |
316 // haven't reached the end, we need to append the suffix. | 318 // haven't reached the end, we need to append the suffix. |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 "italics", StringItalics, | 857 "italics", StringItalics, |
856 "small", StringSmall, | 858 "small", StringSmall, |
857 "strike", StringStrike, | 859 "strike", StringStrike, |
858 "sub", StringSub, | 860 "sub", StringSub, |
859 "sup", StringSup | 861 "sup", StringSup |
860 )); | 862 )); |
861 } | 863 } |
862 | 864 |
863 | 865 |
864 SetupString(); | 866 SetupString(); |
OLD | NEW |