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

Side by Side Diff: pkg/third_party/html5lib/lib/src/inputstream.dart

Issue 23493006: Remove dart:utf in third_party. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot to update pubspec. Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library inputstream; 1 library inputstream;
2 2
3 import 'dart:collection'; 3 import 'dart:collection';
4 import 'dart:utf'; 4 import 'package:utf/utf.dart';
5 import 'package:source_maps/span.dart' show SourceFile; 5 import 'package:source_maps/span.dart' show SourceFile;
6 import 'char_encodings.dart'; 6 import 'char_encodings.dart';
7 import 'constants.dart'; 7 import 'constants.dart';
8 import 'utils.dart'; 8 import 'utils.dart';
9 import 'encoding_parser.dart'; 9 import 'encoding_parser.dart';
10 10
11 /** Hooks to call into dart:io without directly referencing it. */ 11 /** Hooks to call into dart:io without directly referencing it. */
12 class ConsoleSupport { 12 class ConsoleSupport {
13 List<int> bytesFromFile(source) => null; 13 List<int> bytesFromFile(source) => null;
14 } 14 }
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 * string doesn't correspond to a valid encoding. 301 * string doesn't correspond to a valid encoding.
302 */ 302 */
303 String codecName(String encoding) { 303 String codecName(String encoding) {
304 final asciiPunctuation = new RegExp( 304 final asciiPunctuation = new RegExp(
305 "[\u0009-\u000D\u0020-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]"); 305 "[\u0009-\u000D\u0020-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]");
306 306
307 if (encoding == null) return null; 307 if (encoding == null) return null;
308 var canonicalName = encoding.replaceAll(asciiPunctuation, '').toLowerCase(); 308 var canonicalName = encoding.replaceAll(asciiPunctuation, '').toLowerCase();
309 return encodings[canonicalName]; 309 return encodings[canonicalName];
310 } 310 }
OLDNEW
« no previous file with comments | « pkg/third_party/html5lib/lib/src/char_encodings.dart ('k') | pkg/third_party/html5lib/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698