Skip to content

Commit d583958

Browse files
committed
Alphabetical sorting of SeeAlso links
1 parent 49588e4 commit d583958

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

web/src/pages/reference/ID_Lists/Surface_Materials.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ luaTable += `}`;
3838
>
3939
<p>
4040
This is a list San Andreas surface materials that are initialized in the
41-
game's <em>surfinfo.dat</em> file. These IDs can be used with functions such
41+
game's <code>surfinfo.dat</code> file. These IDs can be used with functions such
4242
as <a href="/reference/engineSetSurfaceProperties"
4343
>engineSetSurfaceProperties</a
4444
>.

web/src/utils/general.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ export function getSeeAlsoLinksFromList(seeAlsoList: string[]): SeeAlsoLinkGroup
129129
groupedMap.get(title)!.push(...links);
130130
}
131131

132+
for (const links of groupedMap.values()) {
133+
links.sort((a, b) => a.name.localeCompare(b.name));
134+
}
135+
132136
// Preserve input order for group titles
133137
const seenTitles = new Set<string>();
134138
const orderedTitles = seeAlsoList

0 commit comments

Comments
 (0)