| 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 /** | 5 /** |
| 6 * This generates the reference documentation for the core libraries that come | 6 * This generates the reference documentation for the core libraries that come |
| 7 * with dart. It is built on top of dartdoc, which is a general-purpose library | 7 * with dart. It is built on top of dartdoc, which is a general-purpose library |
| 8 * for generating docs from any Dart code. This library extends that to include | 8 * for generating docs from any Dart code. This library extends that to include |
| 9 * additional information and styling specific to our standard library. | 9 * additional information and styling specific to our standard library. |
| 10 * | 10 * |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 // TODO(rnystrom): Hackish. The IO libraries reference this but we don't | 377 // TODO(rnystrom): Hackish. The IO libraries reference this but we don't |
| 378 // want it in the docs. | 378 // want it in the docs. |
| 379 if (doc.displayName(library) == 'dart:nativewrappers') return; | 379 if (doc.displayName(library) == 'dart:nativewrappers') return; |
| 380 super.docLibrary(library); | 380 super.docLibrary(library); |
| 381 } | 381 } |
| 382 | 382 |
| 383 /** Override definition from parent class to strip out annotation tags. */ | 383 /** Override definition from parent class to strip out annotation tags. */ |
| 384 doc.DocComment createDocComment(String text, | 384 doc.DocComment createDocComment(String text, |
| 385 [ClassMirror inheritedFrom]) { | 385 [ClassMirror inheritedFrom]) { |
| 386 String strippedText = | 386 String strippedText = |
| 387 text.replaceAll(const RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)"), | 387 text.replaceAll(new RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)"), |
| 388 '').trim(); | 388 '').trim(); |
| 389 if (strippedText.isEmpty) return null; | 389 if (strippedText.isEmpty) return null; |
| 390 return super.createDocComment(strippedText, inheritedFrom); | 390 return super.createDocComment(strippedText, inheritedFrom); |
| 391 } | 391 } |
| 392 | 392 |
| 393 doc.DocComment getLibraryComment(LibraryMirror library) { | 393 doc.DocComment getLibraryComment(LibraryMirror library) { |
| 394 if (doc.displayName(library) == HTML_LIBRARY_NAME) { | 394 if (doc.displayName(library) == HTML_LIBRARY_NAME) { |
| 395 return htmldoc.libraryComment; | 395 return htmldoc.libraryComment; |
| 396 } | 396 } |
| 397 return super.getLibraryComment(library); | 397 return super.getLibraryComment(library); |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 return ''' | 580 return ''' |
| 581 <div class="mdn"> | 581 <div class="mdn"> |
| 582 $mdnComment | 582 $mdnComment |
| 583 <div class="mdn-note"><a href="$mdnUrl">from MDN</a></div> | 583 <div class="mdn-note"><a href="$mdnUrl">from MDN</a></div> |
| 584 </div> | 584 </div> |
| 585 '''; | 585 '''; |
| 586 } | 586 } |
| 587 | 587 |
| 588 String toString() => mdnComment; | 588 String toString() => mdnComment; |
| 589 } | 589 } |
| OLD | NEW |