|
68 | 68 | }); |
69 | 69 |
|
70 | 70 | /** |
71 | | - * Makes all markdown links external. |
| 71 | + * Makes all Markdown links external. |
72 | 72 | */ |
73 | 73 | linkElements.addClass('external'); |
74 | 74 | linkElements.attr('target', '_blank'); |
|
81 | 81 | const titleID = clickedElRepoName + '-' + this.id + '-md'; |
82 | 82 | const collapsibleContent = $(element).next('ol'); |
83 | 83 | const reportInfoContent = collapsibleContent.next('p'); |
| 84 | + const whenGeneratedContent = reportInfoContent.next('p'); |
84 | 85 |
|
85 | 86 | $(element).addClass('collapse-link collapsed'); |
86 | 87 | $(element).attr('href', '#' + titleID); |
|
89 | 90 | collapsibleContent.addClass('dependencies-container collapse'); |
90 | 91 | collapsibleContent.attr('id', titleID); |
91 | 92 |
|
92 | | - reportInfoContent.addClass('report-info collapse'); |
93 | | - reportInfoContent.attr('id', titleID + '-p'); |
94 | | - }); |
95 | | - |
96 | | - makeReportInfoCollapsible(mdDestinationEl); |
97 | | - } |
98 | | - |
99 | | - /** |
100 | | - * Makes report information content collapsible. |
101 | | - * |
102 | | - * <p>Report information contains a generation date and the name of the plugin. |
103 | | - * |
104 | | - * @param mdDestinationEl it is a `div` with a markdown content |
105 | | - */ |
106 | | - function makeReportInfoCollapsible(mdDestinationEl) { |
107 | | - const reportInfoContent = mdDestinationEl.find('.report-info'); |
108 | | - |
109 | | - /** |
110 | | - * Inserts a new collapsible title for the paragraph with a report information. |
111 | | - */ |
112 | | - const reportInfoTitleEl = "<h2 class='report-info-title collapse-link collapsed'>Report info</h2>"; |
113 | | - $(reportInfoTitleEl).insertBefore(reportInfoContent); |
114 | | - |
115 | | - reportInfoContent.each(function (index, element) { |
116 | | - const reportInfoID = this.id; |
117 | | - const reportInfoTitle = $(element).prev('.report-info-title'); |
118 | | - |
119 | | - reportInfoTitle.attr('href', '#' + reportInfoID); |
120 | | - reportInfoTitle.attr('data-toggle', 'collapse'); |
| 93 | + reportInfoContent.remove(); |
| 94 | + whenGeneratedContent.remove(); |
121 | 95 | }); |
122 | 96 | } |
123 | 97 | } |
|
0 commit comments