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

Side by Side Diff: pkg/docgen/lib/src/mdn.dart

Issue 202193002: pkg/dartdoc: moving files around, fix library names (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
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.
4
1 library docgen.mdn; 5 library docgen.mdn;
2 6
3 import 'dart:convert'; 7 import 'dart:convert';
4 import 'dart:io'; 8 import 'dart:io';
5 9
6 import 'package:logging/logging.dart'; 10 import 'package:logging/logging.dart';
7 import 'package:path/path.dart' as p; 11 import 'package:path/path.dart' as p;
8 12
9 // TODO(janicejl): Make MDN content generic or pluggable. 13 // TODO(janicejl): Make MDN content generic or pluggable.
10 14
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 if (mdnType['summary'] == null || mdnType['summary'] == "") return ''; 56 if (mdnType['summary'] == null || mdnType['summary'] == "") return '';
53 if (mdnType['srcUrl'] == null) return ''; 57 if (mdnType['srcUrl'] == null) return '';
54 return _htmlifyMdn(mdnType['summary'], mdnType['srcUrl']); 58 return _htmlifyMdn(mdnType['summary'], mdnType['srcUrl']);
55 } 59 }
56 60
57 /// Encloses the given content in an MDN div and the original source link. 61 /// Encloses the given content in an MDN div and the original source link.
58 String _htmlifyMdn(String content, String url) { 62 String _htmlifyMdn(String content, String url) {
59 return '<div class="mdn">' + content.trim() + '<p class="mdn-note">' 63 return '<div class="mdn">' + content.trim() + '<p class="mdn-note">'
60 '<a href="' + url.trim() + '">from Mdn</a></p></div>'; 64 '<a href="' + url.trim() + '">from Mdn</a></p></div>';
61 } 65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698