Previously, when the title argument passed to the link filter was undefined, it would be stringified and included in the returned @link annotation (for example, '{@link some/url undefined }'). This would result in the string 'undefined' being used as the link's text: <a href="some/url">undefined</a>.
This commit fixes the link filter behavior to omit the title when it is undefined. This results in @link annotations that do not include a "title" part (for example, {@link some/url }), which in turn allows the link text to be inferred based on the URL.
NOTE:
This was accidentally broken in commit 32d3b9bcd by switching from lodash's _.template() (which treats undefined properties as empty strings) to a template literal (which stringifies undefined arguments).
Previously, when the
title
argument passed to thelink
filter wasundefined
, it would be stringified and included in the returned@link
annotation (for example,'{@link some/url undefined }'
). This would result in the string'undefined'
being used as the link's text:<a href="some/url">undefined</a>
.This commit fixes the
link
filter behavior to omit thetitle
when it isundefined
. This results in@link
annotations that do not include a "title" part (for example,{@link some/url }
), which in turn allows the link text to be inferred based on the URL.NOTE: This was accidentally broken in commit 32d3b9bcd by switching from lodash's
_.template()
(which treats undefined properties as empty strings) to a template literal (which stringifies undefined arguments).