Chromium Code Reviews| Index: pkg/intl/lib/bidi_utils.dart |
| =================================================================== |
| --- pkg/intl/lib/bidi_utils.dart (revision 14362) |
| +++ pkg/intl/lib/bidi_utils.dart (working copy) |
| @@ -2,6 +2,8 @@ |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| +part of intl; |
| + |
| /** |
| * Bidi stands for Bi-directional text. |
| * According to http://en.wikipedia.org/wiki/Bi-directional_text: |
| @@ -357,8 +359,8 @@ |
| int index = 0; |
| while (sum >= 0 || index > str.length) { |
| int char = str.charCodeAt(index); |
| - if (char == '('.charCodeAt(0)) sum++; |
| - else if (char == ')'.charCodeAt(0)) sum--; |
| + if (char == '('.charCodeAt(0)) { sum++; |
|
Emily Fortuna
2012/10/31 20:17:32
adding brackets here while sum++ is still on the s
Alan Knight
2012/10/31 21:31:59
Interesting. That's something the tool must have d
scheglov
2012/11/01 03:23:27
You probably have some clean ups on "Style" page a
|
| + } else if (char == ')'.charCodeAt(0)) sum--; |
| index++; |
| } |
| return index; |