Skip to content

Commit

Permalink
fix: added missing tbody in table
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilmhdh committed May 3, 2024
1 parent 4e8b98b commit c957265
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
22 changes: 11 additions & 11 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33895,13 +33895,13 @@ const htmlEncoding = string => {

const getTemplate = (userID, imageSize, name, avatarUrl) => {
return `
<td align="center">
<a href="https://github.com/${userID}">
<img src="${avatarUrl}" width="${imageSize};" alt="${userID}"/>
<br />
<sub><b>${name ? name : userID}</b></sub>
</a>
</td>`;
<td align="center">
<a href="https://github.com/${userID}">
<img src="${avatarUrl}" width="${imageSize};" alt="${userID}"/>
<br />
<sub><b>${name ? name : userID}</b></sub>
</a>
</td>`;
};

/**
Expand Down Expand Up @@ -33952,14 +33952,14 @@ const templateBuilder = async (contributors, prevContributors, type) => {
const useUsername = (0,core.getBooleanInput)('use_username');
const columns = Number((0,core.getInput)('columns_per_row').trim());

let contributors_content = `<!-- readme:${type}-start -->\n<table>\n`;
let contributors_content = `<!-- readme:${type}-start -->\n<table>\n<tbody>\t\n`;

contributors = stripDuplicates(contributors, 'login');

const rows = Math.ceil(contributors.length / columns);

for (let row = 1; row <= rows; row++) {
contributors_content += '<tr>';
contributors_content += '\t\t<tr>';
for (
let column = 1;
column <= columns && (row - 1) * columns + column - 1 < contributors.length;
Expand All @@ -33984,10 +33984,10 @@ const templateBuilder = async (contributors, prevContributors, type) => {
contributors_content += getTemplate(login, imageSize, login, avatar_url);
}
}
contributors_content += '</tr>\n';
contributors_content += '\t\t</tr>\n';
}

contributors_content += `</table>\n<!-- readme:${type}-end -->`;
contributors_content += `\t<tbody>\n</table>\n<!-- readme:${type}-end -->`;

return contributors_content;
};
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions src/utils/templateBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import { htmlEncoding } from './htmlEncoding';

export const getTemplate = (userID, imageSize, name, avatarUrl) => {
return `
<td align="center">
<a href="https://github.com/${userID}">
<img src="${avatarUrl}" width="${imageSize};" alt="${userID}"/>
<br />
<sub><b>${name ? name : userID}</b></sub>
</a>
</td>`;
<td align="center">
<a href="https://github.com/${userID}">
<img src="${avatarUrl}" width="${imageSize};" alt="${userID}"/>
<br />
<sub><b>${name ? name : userID}</b></sub>
</a>
</td>`;
};

/**
Expand Down Expand Up @@ -63,14 +63,14 @@ const templateBuilder = async (contributors, prevContributors, type) => {
const useUsername = getBooleanInput('use_username');
const columns = Number(getInput('columns_per_row').trim());

let contributors_content = `<!-- readme:${type}-start -->\n<table>\n`;
let contributors_content = `<!-- readme:${type}-start -->\n<table>\n<tbody>\t\n`;

contributors = stripDuplicates(contributors, 'login');

const rows = Math.ceil(contributors.length / columns);

for (let row = 1; row <= rows; row++) {
contributors_content += '<tr>';
contributors_content += '\t\t<tr>';
for (
let column = 1;
column <= columns && (row - 1) * columns + column - 1 < contributors.length;
Expand All @@ -95,10 +95,10 @@ const templateBuilder = async (contributors, prevContributors, type) => {
contributors_content += getTemplate(login, imageSize, login, avatar_url);
}
}
contributors_content += '</tr>\n';
contributors_content += '\t\t</tr>\n';
}

contributors_content += `</table>\n<!-- readme:${type}-end -->`;
contributors_content += `\t<tbody>\n</table>\n<!-- readme:${type}-end -->`;

return contributors_content;
};
Expand Down

0 comments on commit c957265

Please sign in to comment.