Skip to content

Commit 384b6a8

Browse files
authored
Extend cert scope tables to include parameters (#210)
Signed-off-by: Matthias Büchse <[email protected]>
1 parent 6f68569 commit 384b6a8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

populateCerts.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const sidebarItems = scopes.map((scope) => {
7272
matrix[key].columns[version.version] = {
7373
version: ver,
7474
url,
75+
parameters: standard.parameters,
7576
}
7677
})
7778
})
@@ -101,7 +102,13 @@ Note that the state _Stable_ is shown here if _stabilized at_ is in the future,
101102
// this version of the cert does not include this standard
102103
return ''
103104
}
104-
return `[${col.version}](${col.url})`
105+
let params = Object.entries(col.parameters || {}).map((entry) =>
106+
entry[1].startsWith('https://') ? `[${entry[0]}](${entry[1]})` : `${entry[0]}=${entry[1]}`
107+
).join(', ')
108+
if (params.length) {
109+
params = `(${params})`
110+
}
111+
return `[${col.version}](${col.url}) ${params}`
105112
}).join(' | ') + ' |')
106113
})
107114
lines.push('') // file should end with a single newline character

0 commit comments

Comments
 (0)