Skip to content

Commit 77d1264

Browse files
astashovdevoncarew
authored andcommitted
Fix failing angular2 docs generation [#1315] (#1316)
It appears when we link the references in comments, sometimes `ModelElement element` there could be null. So, need to check it before showing its location in the warning. Testing: Generated Angular 2 docs successfully Fixes #1315
1 parent 91c9ed9 commit 77d1264

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/markdown_processor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ String _linkDocReference(String reference, ModelElement element, NodeList<Commen
180180
// different for doc references. sigh.
181181
return '<a ${classContent}href="${linkedElement.href}">$label</a>';
182182
} else {
183-
warning("unresolved doc reference '$reference' (in ${_elementLocation(element)}");
183+
warning("unresolved doc reference '$reference'${element != null ? " (in ${_elementLocation(element)}" : ""}");
184184
return '<code>${HTML_ESCAPE.convert(label)}</code>';
185185
}
186186
}

0 commit comments

Comments
 (0)