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

Unified Diff: client/web/comment.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/breadcrumbs.html ('k') | client/web/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/web/comment.dart
diff --git a/client/web/comment.dart b/client/web/comment.dart
index 071447e34c3366bcefb5517d471a0f07720b57e2..0a6697fa093c5ea430c39e565c757479eadfa25d 100644
--- a/client/web/comment.dart
+++ b/client/web/comment.dart
@@ -83,7 +83,7 @@ class CommentElement extends DivElement with Polymer, Observable {
var item = loc.item(viewer.homePage);
if (item is! Parameter) return false;
var newAnchor = new AnchorElement()
- ..href = "#${item.anchorHref}"
+ ..href = item.prefixedAnchorHref
..text = loc.lastName;
link.replaceWith(newAnchor);
return true;
@@ -119,7 +119,7 @@ class CommentElement extends DivElement with Polymer, Observable {
void _setLinkReference(AnchorElement link, DocsLocation loc) {
var linkable = new LinkableType(loc.withAnchor);
link
- ..href = '#${linkable.location}'
+ ..href = locationPrefixed(linkable.location)
..text = linkable.simpleType;
}
}
« no previous file with comments | « client/web/breadcrumbs.html ('k') | client/web/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698