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

Unified Diff: client/web/parameters.dart

Issue 149573008: Factor out the anchor prefix to easily allow switching to #! (Closed) Base URL: https://github.com/dart-lang/dartdoc-viewer.git@master
Patch Set: Fixes from review Created 6 years, 10 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 | « client/web/minimap-library.html ('k') | client/web/search.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/web/parameters.dart
diff --git a/client/web/parameters.dart b/client/web/parameters.dart
index 030cab107c269e3b17f1316db81433aac13af442..fc7e33e45f253a0f3952c2fc296b00ca2b86f961 100644
--- a/client/web/parameters.dart
+++ b/client/web/parameters.dart
@@ -6,6 +6,7 @@ library web.parameters;
import 'dart:html';
import 'package:dartdoc_viewer/item.dart';
+import 'package:dartdoc_viewer/location.dart';
import 'package:polymer/polymer.dart';
import 'member.dart';
import 'type.dart';
@@ -47,7 +48,7 @@ class ParameterElement extends DartdocElement {
element.annotations.annotations.forEach((annotation) {
var anchor = new AnchorElement()
..text = '@${annotation.simpleType}'
- ..href = '#${annotation.location}';
+ ..href = '${locationPrefixed(annotation.location)}';
outerSpan.append(anchor);
outerSpan.appendText(' ');
});
@@ -59,8 +60,8 @@ class ParameterElement extends DartdocElement {
}
var parameterName = new AnchorElement()
..text = element.name
- ..href = "#${element.anchorHref}"
- ..id = "${element.anchorHrefLocation.anchor}";
+ ..href = element.prefixedAnchorHref
+ ..id = element.anchorHrefLocation.anchor;
outerSpan.appendText(space);
outerSpan.append(parameterName);
outerSpan.appendText(element.decoration);
« no previous file with comments | « client/web/minimap-library.html ('k') | client/web/search.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698