Chromium Code Reviews| Index: pkg/front_end/lib/src/fasta/util/relativize.dart |
| diff --git a/pkg/front_end/lib/src/fasta/util/relativize.dart b/pkg/front_end/lib/src/fasta/util/relativize.dart |
| index 59e9f16b290ed986f35b02698718b58fc6f26862..bae65ede779f3c82e00161bee48f8858885124e0 100644 |
| --- a/pkg/front_end/lib/src/fasta/util/relativize.dart |
| +++ b/pkg/front_end/lib/src/fasta/util/relativize.dart |
| @@ -9,6 +9,7 @@ library fasta.util.relativize; |
| String relativizeUri(Uri uri, {Uri base}) { |
| if (uri == null) return null; |
| base ??= Uri.base; |
| - String result = "$uri"; |
|
ahe
2017/02/21 14:15:23
I prefer the existing style, and I know dart2js ge
|
| - return result.startsWith("$base") ? result.substring("$base".length) : result; |
| + String result = uri.toString(); |
| + final prefix = base.toString(); |
|
ahe
2017/02/21 14:15:22
String prefix = "$base";
kustermann
2017/02/22 14:40:28
I changed it because I saw some interpolate instru
ahe
2017/02/22 14:50:06
Let's not forget this. I'm pretty sure we have a b
|
| + return result.startsWith(prefix) ? result.substring(prefix.length) : result; |
| } |