| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of client_live_nav; |
| 6 |
| 5 // Code shared between the different client-side libraries. | 7 // Code shared between the different client-side libraries. |
| 6 | 8 |
| 7 // The names of the library and type that this page documents. | 9 // The names of the library and type that this page documents. |
| 8 String currentLibrary = null; | 10 String currentLibrary = null; |
| 9 String currentType = null; | 11 String currentType = null; |
| 10 | 12 |
| 11 // What we need to prefix relative URLs with to get them to work. | 13 // What we need to prefix relative URLs with to get them to work. |
| 12 String prefix = ''; | 14 String prefix = ''; |
| 13 | 15 |
| 14 void setup() { | 16 void setup() { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 99 |
| 98 String getLibraryMemberUrl(String libraryName, Map memberInfo) => | 100 String getLibraryMemberUrl(String libraryName, Map memberInfo) => |
| 99 '$prefix${sanitize(libraryName)}.html#${getMemberAnchor(memberInfo)}'; | 101 '$prefix${sanitize(libraryName)}.html#${getMemberAnchor(memberInfo)}'; |
| 100 | 102 |
| 101 String getTypeMemberUrl(String libraryName, String typeName, Map memberInfo) => | 103 String getTypeMemberUrl(String libraryName, String typeName, Map memberInfo) => |
| 102 '$prefix${sanitize(libraryName)}/${sanitize(typeName)}.html#' | 104 '$prefix${sanitize(libraryName)}/${sanitize(typeName)}.html#' |
| 103 '${getMemberAnchor(memberInfo)}'; | 105 '${getMemberAnchor(memberInfo)}'; |
| 104 | 106 |
| 105 String getMemberAnchor(Map memberInfo) => memberInfo.containsKey(LINK_NAME) | 107 String getMemberAnchor(Map memberInfo) => memberInfo.containsKey(LINK_NAME) |
| 106 ? memberInfo[LINK_NAME] : memberInfo[NAME]; | 108 ? memberInfo[LINK_NAME] : memberInfo[NAME]; |
| OLD | NEW |