Skip to content

Commit

Permalink
Fix README generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdAurora committed Feb 3, 2024
1 parent 12f7cf8 commit 402407f
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions build_src/mod.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -266,23 +266,21 @@ export default class Mod {
return [];

let prettified = [];
/*let min = this.versions[0], current = min;

for (let i = 1; i < this.versions.length; i++) {
if (Math.floor(this.versions[i].id) !== Math.floor(current.id) + 1 || this.versions[i].loader !== this.versions[i].loader
|| this.versions[i].note !== current.note) {
for (const loader of Object.keys(this.versions)) {
const versions = this.versions[loader].map(version => {
return {id: typeof version.id === "number" ? `1.${version.id}` : version.id, note: version.note};
});
const segmented = segment_versions(versions)
.map(segment => {
const note = segment[0].note === "" ? "" : ` (${segment[0].note})`;
if (segment.length === 1) return segment[0].id + note;
else return segment[0].id + " -> " + segment[segment.length - 1].id + note;
}).join(", ");

const note = current.note === "" ? "" : ` (${current.note})`;
prettified.push(`${current.loader}: ` + (min === current ? `1.${current.id}${note}` : `1.${min.id} -> 1.${current.id}${note}`));
min = current = this.versions[i];
} else {
current = this.versions[i];
}
prettified.push(`${loader}: ${segmented}`);
}

const note = current.note === "" ? "" : ` (${current.note})`;
prettified.push(`${current.loader}: ` + (min === current ? `1.${current.id}${note}` : `1.${min.id} -> 1.${current.id}${note}`));*/

return prettified;
}

Expand Down

0 comments on commit 402407f

Please sign in to comment.