Skip to content

Commit f0c6675

Browse files
committed
docs: remove last hr in the list of endpoints.
1 parent e8a5d57 commit f0c6675

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

public/docs/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,6 @@ <h4 class="text-slate-200 font-semibold mb-3">Response Structure</h4>
19861986
</div>
19871987
</div>
19881988
</div>
1989-
<hr />
19901989
</div>
19911990
</div>
19921991
</div>

scripts/generate-docs.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ function generateEndpointSection(endpoint, responseStructureHtml) {
303303
function generateDocs() {
304304
console.log("Generating documentation...");
305305

306-
let endpointsHtml = "";
306+
const endpointHtmls = [];
307307

308308
endpoints.forEach(endpoint => {
309309
try {
@@ -339,14 +339,17 @@ function generateDocs() {
339339

340340
const responseStructureHtml = generateResponseStructure(sampleObject, endpoint.isObject);
341341
const endpointHtml = generateEndpointSection(endpoint, responseStructureHtml);
342-
endpointsHtml += endpointHtml + "\n <hr />\n";
342+
endpointHtmls.push(endpointHtml);
343343

344344
console.log(`✓ Generated ${endpoint.id}`);
345345
} catch (error) {
346346
console.error(`Error processing ${endpoint.id}:`, error.message);
347347
}
348348
});
349349

350+
// Join endpoints with <hr /> between them (but not after the last one)
351+
const endpointsHtml = endpointHtmls.join("\n <hr />\n");
352+
350353
// Read the template
351354
const templatePath = path.join(__dirname, "..", "public", "docs", "template.html");
352355
let template = fs.readFileSync(templatePath, "utf8");

0 commit comments

Comments
 (0)