File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export default (ctx) => ({
6969 * Renders `@example` tags from a comment as Markdown.
7070 * Pass `headingLevel` to prepend a heading (block context);
7171 * omit it for inline use (e.g. inside a list item).
72- * Always returns a string — never `null`.
72+ * Always returns a string never `null`.
7373 *
7474 * @param {import("typedoc").Comment | import("typedoc").CommentTag | null | undefined } comment
7575 * @param {number } [headingLevel]
@@ -83,17 +83,15 @@ export default (ctx) => ({
8383 const bodies = examples
8484 . map ( ( tag ) => {
8585 const body = ctx . helpers . getCommentParts ( tag . content ) . trim ( ) ;
86- if ( ! body ) return null ; // skip empty @example tags
86+ if ( ! body ) return null ;
8787
8888 if ( headingLevel != null ) {
89- // Block context (signature / comment partial) → add heading
9089 const prefix = "#" . repeat ( headingLevel + 1 ) ;
9190 const suffix =
9291 examples . length > 1 ? ` ${ examples . indexOf ( tag ) + 1 } ` : "" ;
9392 return `${ prefix } Example${ suffix } \n\n${ body } ` ;
9493 }
9594
96- // Inline context (typedListItem) → no heading, just body
9795 return body ;
9896 } )
9997 . filter ( Boolean ) ;
You can’t perform that action at this time.
0 commit comments