Skip to content

Commit 15b4e1f

Browse files
committed
Merge pull request #618 from dart-lang/devoncarew_remove_warning
Devoncarew remove warning
2 parents d4176cf + ca1b17c commit 15b4e1f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

lib/markdown_processor.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ const _rightChar = ']';
2424

2525
final List<md.InlineSyntax> _markdown_syntaxes = [new _InlineCodeSyntax()];
2626

27+
// We don't emit warnings currently: #572.
28+
const bool _emitWarning = false;
29+
2730
String renderMarkdownToHtml(String text, [ModelElement element]) {
2831
// TODO: `renderMarkdownToHtml` is never called with an element arg.
2932
// TODO(keertip): use this for the one liner.
@@ -172,7 +175,10 @@ String _replaceAllLinks(ModelElement element, String str,
172175
if (link != null) {
173176
buf.write('<a href="$link">$codeRef</a>');
174177
} else {
175-
print(" warning: unresolved doc reference '$codeRef' (in $element)");
178+
if (_emitWarning) {
179+
print(
180+
" warning: unresolved doc reference '$codeRef' (in $element)");
181+
}
176182
buf.write(codeRef);
177183
}
178184
}

lib/src/html_generator.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ class HtmlGeneratorInstance {
223223
print('generating docs for library ${lib.path}...');
224224

225225
if (!lib.hasDocumentation) {
226-
print(
227-
" warning: library '${lib.name}' has no documentation; consider adding some");
226+
print(" warning: library '${lib.name}' has no documentation");
228227
}
229228

230229
// TODO: Should we add _this_ to the context and avoid putting stuff in the

0 commit comments

Comments
 (0)