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

Unified Diff: lib/src/media_type.dart

Issue 1046573002: pkg/http_parser: format code, prepare for +6 release (Closed) Base URL: https://github.com/dart-lang/http_parser.git@master
Patch Set: cl feedback Created 5 years, 9 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 | « lib/src/http_date.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/media_type.dart
diff --git a/lib/src/media_type.dart b/lib/src/media_type.dart
index 7a1ff23ba7f78686e8d543085043078389c0de4b..fa9350e32eabdf8a2bcccf6a3a579fc357d8fd19 100644
--- a/lib/src/media_type.dart
+++ b/lib/src/media_type.dart
@@ -73,8 +73,9 @@ class MediaType {
} else {
scanner.expect(_quotedString);
var quotedString = scanner.lastMatch[0];
- value = quotedString.substring(1, quotedString.length - 1).
- replaceAllMapped(_quotedPair, (match) => match[1]);
+ value = quotedString
+ .substring(1, quotedString.length - 1)
+ .replaceAllMapped(_quotedPair, (match) => match[1]);
}
scanner.scan(_whitespace);
@@ -139,17 +140,17 @@ class MediaType {
/// This will produce a valid HTTP media type.
String toString() {
var buffer = new StringBuffer()
- ..write(type)
- ..write("/")
- ..write(subtype);
+ ..write(type)
+ ..write("/")
+ ..write(subtype);
parameters.forEach((attribute, value) {
buffer.write("; $attribute=");
if (_nonToken.hasMatch(value)) {
buffer
..write('"')
- ..write(value.replaceAllMapped(
- _escapedChar, (match) => "\\" + match[0]))
+ ..write(
+ value.replaceAllMapped(_escapedChar, (match) => "\\" + match[0]))
..write('"');
} else {
buffer.write(value);
« no previous file with comments | « lib/src/http_date.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698