Chromium Code Reviews| Index: pkg/intl/lib/bidi_utils.dart |
| =================================================================== |
| --- pkg/intl/lib/bidi_utils.dart (revision 13712) |
| +++ pkg/intl/lib/bidi_utils.dart (working copy) |
| @@ -315,7 +315,8 @@ |
| * Otherwise, returns UNKNOWN, which is used to mean `neutral`. |
| * Numbers and URLs are counted as weakly LTR. |
| */ |
| - static TextDirection estimateDirectionOfText(String text, [bool isHtml=false]) { |
| + static TextDirection estimateDirectionOfText(String text, |
| + {bool isHtml: false}) { |
| text = isHtml? stripHtmlIfNeeded(text) : text; |
| var rtlCount = 0; |
| var total = 0; |
| @@ -393,7 +394,7 @@ |
| * text should be laid out in RTL direction. If [isHtml] is true, the string |
| * is HTML or HTML-escaped. |
| */ |
| - static bool detectRtlDirectionality(String str, [bool isHtml]) { |
| - return estimateDirectionOfText(str, isHtml) == TextDirection.RTL; |
| + static bool detectRtlDirectionality(String str, {bool isHtml}) { |
|
Lasse Reichstein Nielsen
2012/10/17 14:56:10
Give it a default value of false, instead of relyi
regis
2012/10/17 19:58:16
Done. But I need to postpone these changes in bidi
|
| + return estimateDirectionOfText(str, isHtml: isHtml) == TextDirection.RTL; |
| } |
| } |