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

Side by Side Diff: pkg/third_party/html5lib/lib/parser.dart

Issue 297203009: Fix a couple more tests that were relying on sourcemap message format. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: changelog Created 6 years, 6 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
« no previous file with comments | « pkg/third_party/html5lib/CHANGELOG.md ('k') | pkg/third_party/html5lib/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /// This library has a parser for HTML5 documents, that lets you parse HTML 1 /// This library has a parser for HTML5 documents, that lets you parse HTML
2 /// easily from a script or server side application: 2 /// easily from a script or server side application:
3 /// 3 ///
4 /// import 'package:html5lib/parser.dart' show parse; 4 /// import 'package:html5lib/parser.dart' show parse;
5 /// import 'package:html5lib/dom.dart'; 5 /// import 'package:html5lib/dom.dart';
6 /// main() { 6 /// main() {
7 /// var document = parse( 7 /// var document = parse(
8 /// '<body>Hello world! <a href="www.html5rocks.com">HTML5 rocks!'); 8 /// '<body>Hello world! <a href="www.html5rocks.com">HTML5 rocks!');
9 /// print(document.outerHtml); 9 /// print(document.outerHtml);
10 /// } 10 /// }
(...skipping 3336 matching lines...) Expand 10 before | Expand all | Expand 10 after
3347 /// Gets the human readable error message for this error. Use 3347 /// Gets the human readable error message for this error. Use
3348 /// [span.getLocationMessage] or [toString] to get a message including span 3348 /// [span.getLocationMessage] or [toString] to get a message including span
3349 /// information. If there is a file associated with the span, both 3349 /// information. If there is a file associated with the span, both
3350 /// [span.getLocationMessage] and [toString] are equivalent. Otherwise, 3350 /// [span.getLocationMessage] and [toString] are equivalent. Otherwise,
3351 /// [span.getLocationMessage] will not show any source url information, but 3351 /// [span.getLocationMessage] will not show any source url information, but
3352 /// [toString] will include 'ParserError:' as a prefix. 3352 /// [toString] will include 'ParserError:' as a prefix.
3353 String get message => formatStr(errorMessages[errorCode], data); 3353 String get message => formatStr(errorMessages[errorCode], data);
3354 3354
3355 String toString() { 3355 String toString() {
3356 var res = span.getLocationMessage(message); 3356 var res = span.getLocationMessage(message);
3357 return span.sourceUrl == null ? 'ParserError$res' : res; 3357 return span.sourceUrl == null ? 'ParserError on $res' : 'On $res';
3358 } 3358 }
3359 } 3359 }
3360 3360
3361 3361
3362 /// Convenience function to get the pair of namespace and localName. 3362 /// Convenience function to get the pair of namespace and localName.
3363 Pair<String, String> getElementNameTuple(Element e) { 3363 Pair<String, String> getElementNameTuple(Element e) {
3364 var ns = e.namespaceUri; 3364 var ns = e.namespaceUri;
3365 if (ns == null) ns = Namespaces.html; 3365 if (ns == null) ns = Namespaces.html;
3366 return new Pair(ns, e.localName); 3366 return new Pair(ns, e.localName);
3367 } 3367 }
OLDNEW
« no previous file with comments | « pkg/third_party/html5lib/CHANGELOG.md ('k') | pkg/third_party/html5lib/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698