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

Unified Diff: client/web/link.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/library-panel.html ('k') | client/web/main.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/web/link.dart
diff --git a/client/web/link.dart b/client/web/link.dart
index 3d068d039c8f134747aa7d41e4e1a0fc7313a180..ae4247dee0dbaa28e1b5fe6f68c456d3491b266a 100644
--- a/client/web/link.dart
+++ b/client/web/link.dart
@@ -8,6 +8,7 @@ import 'dart:html';
import 'package:dartdoc_viewer/item.dart';
import 'package:dartdoc_viewer/search.dart' show searchIndex;
import 'package:polymer/polymer.dart';
+import 'package:dartdoc_viewer/location.dart';
// TODO(jmesserly): just extend HtmlElement?
@CustomTag("dartdoc-link")
@@ -28,7 +29,7 @@ class LinkElement extends PolymerElement {
Element child;
final location = type.loc.withoutAnchor;
if (searchIndex.map.containsKey(location)) {
- child = new AnchorElement()..href = '#${type.loc.withAnchor}';
+ child = new AnchorElement()..href = locationPrefixed(type.loc.withAnchor);
} else {
child = new Element.tag('i');
}
« no previous file with comments | « client/web/library-panel.html ('k') | client/web/main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698