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

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

Issue 11194025: Second round of cleanups for new optional parameter semantics. (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
Index: pkg/intl/lib/bidi_formatter.dart
===================================================================
--- pkg/intl/lib/bidi_formatter.dart (revision 13712)
+++ pkg/intl/lib/bidi_formatter.dart (working copy)
@@ -113,9 +113,9 @@
* a trailing unicode BiDi mark matching the context directionality is
* appended (LRM or RLM). If [isHtml] is false, we HTML-escape the [text].
*/
- String wrapWithSpan(String text, [bool isHtml=false, bool resetDir=true,
- TextDirection direction]) {
- if (direction == null) direction = estimateDirection(text, isHtml);
+ String wrapWithSpan(String text, {bool isHtml: false, bool resetDir: true,
+ TextDirection direction}) {
+ if (direction == null) direction = estimateDirection(text, isHtml: isHtml);
var result;
if (!isHtml) text = htmlEscape(text);
var directionChange = contextDirection.isDirectionChange(direction);
@@ -150,9 +150,9 @@
* [isHtml]. [isHtml] is used to designate if the text contains HTML (escaped
* or unescaped).
*/
- String wrapWithUnicode(String text, [bool isHtml=false, bool resetDir=true,
- TextDirection direction]) {
- if (direction == null) direction = estimateDirection(text, isHtml);
+ String wrapWithUnicode(String text, {bool isHtml: false, bool resetDir: true,
+ TextDirection direction}) {
+ if (direction == null) direction = estimateDirection(text, isHtml: isHtml);
var result = text;
if (contextDirection.isDirectionChange(direction)) {
var marker = direction == TextDirection.RTL ? Bidi.RLE : Bidi.LRE;
@@ -168,8 +168,8 @@
* TextDirection.UNKNOWN return value indicates completely neutral input.
* [isHtml] is true if [text] HTML or HTML-escaped.
*/
- TextDirection estimateDirection(String text, [bool isHtml=false]) {
- return Bidi.estimateDirectionOfText(text, isHtml); //TODO~!!!
+ TextDirection estimateDirection(String text, {bool isHtml: false}) {
+ return Bidi.estimateDirectionOfText(text, isHtml: isHtml); //TODO~!!!
}
/**

Powered by Google App Engine
This is Rietveld 408576698