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

Unified Diff: lib/src/util.dart

Issue 1274763005: Clean up: (Closed) Base URL: https://github.com/dart-lang/markdown.git@master
Patch Set: Bump. Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/inline_parser.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/util.dart
diff --git a/lib/src/util.dart b/lib/src/util.dart
index 4b5f6d55ea09ab198074b4e939efbc4d401a149c..e254d26e8d3bc27f90cc0fe621280f1df0e97720 100644
--- a/lib/src/util.dart
+++ b/lib/src/util.dart
@@ -1,20 +1,9 @@
-library markdown.util;
+library markdown.src.util;
/// Replaces `<`, `&`, and `>`, with their HTML entity equivalents.
String escapeHtml(String html) {
- if (html == '' || html == null) return null;
return html
.replaceAll('&', '&amp;')
.replaceAll('<', '&lt;')
.replaceAll('>', '&gt;');
}
-
-/// Removes null or empty values from [map].
-void cleanMap(Map map) {
- map.keys.where((e) => isNullOrEmpty(map[e])).toList().forEach(map.remove);
-}
-
-/// Returns true if an object is null or an empty string.
-bool isNullOrEmpty(object) {
- return object == null || object == '';
-}
« no previous file with comments | « lib/src/inline_parser.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698