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

Unified Diff: client/lib/item.dart

Issue 695593003: Look for the file name with a hyphen rather than a colon (Closed) Base URL: https://github.com/dart-lang/dartdoc-viewer.git@master
Patch Set: Previous version was on out of date base Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/lib/item.dart
diff --git a/client/lib/item.dart b/client/lib/item.dart
index daf7b139ae51bd2b9fb546dfe489de61e876d8e1..3de72908645ab6c198f4e9be83ed06f13a51fdb2 100644
--- a/client/lib/item.dart
+++ b/client/lib/item.dart
@@ -410,10 +410,13 @@ abstract class LazyItem extends Item {
LazyItem(String qualifiedName, String name, this.previewComment,
[String comment]) : super(name, qualifiedName, comment);
+ /// The name of the file/url path we'll use to retrieve this item's data.
+ String get fileName => qualifiedName.replaceFirst(":", "-");
+
/// Loads this [Item]'s data and populates all fields.
Future load() {
if (isLoaded) return new Future.value(this);
- var location = '$docsPath$qualifiedName.json';
+ var location = '$docsPath$fileName.json';
var data = retrieveFileContents(location);
return data.then((response) {
loadValues(JSON.decode(response));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698