Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/common/src/components/SlintProperty.astro
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ const typeInfo = getTypeInfo(typeName);
if (typeInfo.href !== "") {
const base = import.meta.env.BASE_URL;
typeInfo.href = `${base}${typeInfo.href}`;

// For enums and structs, we can assume they have a permalink to their header on the target page.
// (These permalinks are also always lower-case.)
if (typeName == "enum") {
typeInfo.href += "#" + enumName.toLowerCase();
} else if (typeName == "struct") {
typeInfo.href += "#" + structName.toLowerCase();
}
}
const enumContent = await getEnumContent(enumName);
const structContent = await getStructContent(structName);
Expand Down
Loading