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

Unified Diff: utils/dartdoc/classify.dart

Issue 8725007: Lots of stuff hooking up markdown to dartdoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to awesome reviews. Created 9 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 | « utils/dartdoc/README.txt ('k') | utils/dartdoc/dartdoc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/dartdoc/classify.dart
diff --git a/utils/dartdoc/classify.dart b/utils/dartdoc/classify.dart
index f2de3cb84760f321708cbe31f330cdb0d943835a..aad85f5c87ea106f7490b7e9f50794e7de945e1f 100644
--- a/utils/dartdoc/classify.dart
+++ b/utils/dartdoc/classify.dart
@@ -48,7 +48,7 @@ String classifySource(SourceFile src) {
}
final kind = classify(token);
- final text = htmlEscape(token.text);
+ final text = md.escapeHtml(token.text);
if (kind != null) {
// Add a secondary class to tokens appearing within a string so that
// we can highlight tokens in an interpolation specially.
@@ -66,12 +66,6 @@ String classifySource(SourceFile src) {
return html.toString();
}
-// TODO(rnystrom): should exist in standard lib somewhere
-String htmlEscape(String text) {
- return text.replaceAll('&', '&').replaceAll(
- '>', '&gt;').replaceAll('<', '&lt;');
-}
-
bool _looksLikeType(String name) {
// If the name looks like an UppercaseName, assume it's a type.
return _looksLikePublicType(name) || _looksLikePrivateType(name);
« no previous file with comments | « utils/dartdoc/README.txt ('k') | utils/dartdoc/dartdoc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698