Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1221)

Unified Diff: pkg/intl/lib/bidi_utils.dart

Issue 11200003: Change bidi_utils and bidi_formatter for new optional parameters. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/intl/lib/bidi_formatter.dart ('k') | pkg/intl/test/bidi_format_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/bidi_utils.dart
===================================================================
--- pkg/intl/lib/bidi_utils.dart (revision 13754)
+++ 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: false}) {
+ return estimateDirectionOfText(str, isHtml: isHtml) == TextDirection.RTL;
}
}
« no previous file with comments | « pkg/intl/lib/bidi_formatter.dart ('k') | pkg/intl/test/bidi_format_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698