Skip to content

Commit

Permalink
move space
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaucasau committed Feb 28, 2024
1 parent ec645f2 commit d01963f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/lib/api/processHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export function processMembersAndSetMeta(
.map((child) => {
const $child = $(child);
const id = $dl.find("dt").attr("id") || "";
const github = prepareGitHubLink($, $child);
const github = ` ${prepareGitHubLink($, $child)}`;

const apiType = getApiType($dl);

Expand All @@ -301,7 +301,7 @@ export function processMembersAndSetMeta(

if (apiType == "class") {
findByText($, $main, "em.property", "class").remove();
return `<span class="target" id="${id}"/><p><code>${$child.html()}</code> ${github}</p>`;
return `<span class="target" id="${id}"/><p><code>${$child.html()}</code>${github}</p>`;
}

if (apiType == "property") {
Expand All @@ -312,7 +312,7 @@ export function processMembersAndSetMeta(
findByText($, $main, "em.property", "property").remove();
const signature = $child.find("em").text()?.replace(/^:\s+/, "");
if (signature.trim().length === 0) return;
return `<span class="target" id='${id}'/><p><code>${signature}</code> ${github}</p>`;
return `<span class="target" id='${id}'/><p><code>${signature}</code>${github}</p>`;
}

if (apiType == "method") {
Expand All @@ -332,7 +332,7 @@ export function processMembersAndSetMeta(
}

findByText($, $main, "em.property", "method").remove();
return `<span class="target" id='${id}'/><p><code>${$child.html()}</code> ${github}</p>`;
return `<span class="target" id='${id}'/><p><code>${$child.html()}</code>${github}</p>`;
}

if (apiType == "attribute") {
Expand All @@ -344,7 +344,7 @@ export function processMembersAndSetMeta(
findByText($, $main, "em.property", "attribute").remove();
const signature = $child.find("em").text()?.replace(/^:\s+/, "");
if (signature.trim().length === 0) return;
return `<span class="target" id='${id}'/><p><code>${signature}</code> ${github}</p>`;
return `<span class="target" id='${id}'/><p><code>${signature}</code>${github}</p>`;
}

// Else, the attribute is embedded on the class
Expand Down Expand Up @@ -377,7 +377,7 @@ export function processMembersAndSetMeta(

if (apiType === "function" || apiType === "exception") {
findByText($, $main, "em.property", apiType).remove();
const descriptionHtml = `<span class="target" id="${id}"/><p><code>${$child.html()}</code> ${github}</p>`;
const descriptionHtml = `<span class="target" id="${id}"/><p><code>${$child.html()}</code>${github}</p>`;

const pageHeading = $dl.siblings("h1").text();
if (id.endsWith(pageHeading) && pageHeading != "") {
Expand Down

0 comments on commit d01963f

Please sign in to comment.