Closed IonicaBizau closed 10 years ago
You could write a custom template that remove the first line of the comment when it the matches the function name...
@cbou Can you help me writing one?
I did it!
<? docfiles.forEach(function(doc) { -?>
<? doc.javadoc.forEach(function(comment) { -?>
<? if (!comment.ignore) { -?>
<? if (comment.name) { -?>
<? if (comment.isMethod || comment.isFunction) { -?>
## `<?= comment.name -?>(<?= comment.paramStr -?>)`
<? } else { -?>
## <?= comment.name ?>
<? } -?>
<? } -?>
<? if (comment.description.split("\n")[0] == comment.name) { -?>
<? comment.description = comment.description.split("\n").slice(1).join("\n"); -?>
<? } -?>
<?= comment.description -?>
<? if (comment.deprecated) { ?>
**Deprecated**
<? } ?>
<? if (comment.author) { ?>
Author: <?- comment.author ?>
<? } ?>
<? if (comment.version) { ?>
Version: <?= comment.version ?>
<? } ?>
<? if (comment.see) { ?>
See: <?= comment.see ?>
<? } ?>
<? if (comment.paramTags.length > 0) { ?>
### Params: <? comment.paramTags.forEach(function(paramTag) { ?>
* **<?= paramTag.joinedTypes ?>** `<?= paramTag.name ?>`: <?= paramTag.description ?><? }) ?>
<? } ?>
<? if (comment.returnTags.length > 0) { ?>
### Return:
<? comment.returnTags.forEach(function(returnTag) { -?>
* **<?= returnTag.joinedTypes ?>** <?= returnTag.description ?>
<? }) ?>
<? } ?>
<? } ?>
<? }) ?>
<? }) ?>
I have this test content:
markdox
generated a markdown file containing:I don't want
\nfoo
there. Instead of:I need
Is there any way to configure markdox to do this?