File tree Expand file tree Collapse file tree 5 files changed +60
-20
lines changed
doxdox-renderer-bootstrap/src
doxdox-renderer-github-wiki/src
doxdox-renderer-markdown/src Expand file tree Collapse file tree 5 files changed +60
-20
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,9 @@ const renderMethod = (method: Method) => `<div class="mb-5"><a name="${
33
33
34
34
${ method . description ? md . render ( method . description ) : '' }
35
35
36
- <h3>Parameters</h3>
36
+ ${
37
+ method . params . length
38
+ ? `<h3>Parameters</h3>
37
39
38
40
<div class="table-responsive">
39
41
${ md
48
50
] )
49
51
)
50
52
. replace ( '<table>' , '<table class="table">' ) }
51
- </div>
53
+ </div>`
54
+ : ''
55
+ }
52
56
53
- <h3>Returns</h3>
57
+ ${
58
+ method . returns . length
59
+ ? `<h3>Returns</h3>
54
60
55
61
${ method . returns . map (
56
62
param => `<p><code>${ param . types . join ( '</code>, <code>' ) } </code></p>
57
63
58
64
<p>${ param . description } </p>`
59
- ) }
65
+ ) } `
66
+ : ''
67
+ }
60
68
61
69
</div>
62
70
` ;
Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ const renderMethod = (doc: Doc, method: Method) => `<!DOCTYPE html>
52
52
53
53
${ method . description ? md . render ( method . description ) : '' }
54
54
55
- <h3>Parameters</h3>
55
+ ${
56
+ method . params . length
57
+ ? `<h3>Parameters</h3>
56
58
57
59
<div class="table-responsive">
58
60
${ md
67
69
] )
68
70
)
69
71
. replace ( '<table>' , '<table class="table">' ) }
70
- </div>
72
+ </div>`
73
+ : ''
74
+ }
71
75
72
- <h3>Returns</h3>
76
+ ${
77
+ method . returns . length
78
+ ? `<h3>Returns</h3>
73
79
74
80
${ method . returns . map (
75
81
param => `<p><code>${ param . types . join ( '</code>, <code>' ) } </code></p>
76
82
77
83
<p>${ param . description } </p>`
78
- ) }
84
+ ) } `
85
+ : ''
86
+ }
79
87
80
88
</div>
81
89
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ const renderMethod = (method: Method) => `## ${method.fullName}
10
10
11
11
${ method . description }
12
12
13
- ### Parameters
13
+ ${
14
+ method . params . length
15
+ ? `### Parameters
14
16
15
17
${ markdownTable ( [
16
18
[ 'Name' , 'Types' , 'Description' ] ,
@@ -19,14 +21,20 @@ ${markdownTable([
19
21
types . join ( ', ' ) ,
20
22
description
21
23
] )
22
- ] ) }
24
+ ] ) } `
25
+ : ''
26
+ }
23
27
24
- ### Returns
28
+ ${
29
+ method . returns . length
30
+ ? `### Returns
25
31
26
32
${ method . returns . map (
27
33
param => `${ param . types . join ( ', ' ) }
28
34
${ param . description } `
29
- ) }
35
+ ) } `
36
+ : ''
37
+ }
30
38
31
39
Documentation generated with [doxdox](https://github.com/docsbydoxdox/doxdox)
32
40
Original file line number Diff line number Diff line change @@ -6,7 +6,9 @@ const renderMethod = (method: Method) => `## ${method.fullName}
6
6
7
7
${ method . description }
8
8
9
- ### Parameters
9
+ ${
10
+ method . params . length
11
+ ? `### Parameters
10
12
11
13
${ markdownTable ( [
12
14
[ 'Name' , 'Types' , 'Description' ] ,
@@ -15,14 +17,20 @@ ${markdownTable([
15
17
types . join ( ', ' ) ,
16
18
description
17
19
] )
18
- ] ) }
20
+ ] ) } `
21
+ : ''
22
+ }
19
23
20
- ### Returns
24
+ ${
25
+ method . returns . length
26
+ ? `### Returns
21
27
22
28
${ method . returns . map (
23
29
param => `${ param . types . join ( ', ' ) }
24
30
${ param . description } `
25
- ) }
31
+ ) } `
32
+ : ''
33
+ }
26
34
27
35
` ;
28
36
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ const renderMethod = (method: Method) => `<div class="mb-5"><a name="${
30
30
31
31
${ method . description ? md . render ( method . description ) : '' }
32
32
33
- <h3>Parameters</h3>
33
+ ${
34
+ method . params . length
35
+ ? `<h3>Parameters</h3>
34
36
35
37
<div class="table-responsive">
36
38
${ md
45
47
] )
46
48
)
47
49
. replace ( '<table>' , '<table class="table">' ) }
48
- </div>
50
+ </div>`
51
+ : ''
52
+ }
49
53
50
- <h3>Returns</h3>
54
+ ${
55
+ method . returns . length
56
+ ? `<h3>Returns</h3>
51
57
52
58
${ method . returns . map (
53
59
param => `<p><code>${ param . types . join ( '</code>, <code>' ) } </code></p>
54
60
55
61
<p>${ param . description } </p>`
56
- ) }
62
+ ) } `
63
+ : ''
64
+ }
57
65
58
66
</div>
59
67
` ;
You can’t perform that action at this time.
0 commit comments