Skip to content

Commit

Permalink
Merge pull request #271 from json-schema-org/benjagm-fix-compliance-n…
Browse files Browse the repository at this point in the history
…otes

Fix to include compliance notes of the validators
  • Loading branch information
benjagm authored Jan 18, 2024
2 parents 913c8d7 + a2be23a commit 96bd8fb
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion pages/implementations/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,23 @@ function ImplementationTable ({ implementationsByLanguage, prefix }: { implement
</td>
</tr>
{implementationByLanguage.implementations.map((implementation: any, index: number) => {
let mixedNotes = ''
if (implementation.notes) {
mixedNotes = implementation.notes
}
if (implementation.compliance) {
if (implementation.notes) {
mixedNotes += '<br/><em>Compliance:</em>'
} else {
mixedNotes = '<em>Compliance:</em>'
}
if (implementation.compliance.config.docs) {
mixedNotes += ' This implementation <a href="' + implementation.compliance.config.docs + '">documents</a> that you must '
}
if (implementation.compliance.config.instructions) {
mixedNotes += '<strong>' + implementation.compliance.config.instructions + '</strong> to produce specification-compliant behavior.'
}
}
const allDrafts = [
...(implementation['date-draft'] || []),
...(implementation['draft'] || [])
Expand All @@ -118,7 +135,7 @@ function ImplementationTable ({ implementationsByLanguage, prefix }: { implement
<a className='text-blue-500' href={implementation.url}>{implementation.name}</a>
</td>
<td className='pl-6 hidden sm:table-cell'>
<StyledMarkdown markdown={implementation.notes} />
<StyledMarkdown markdown={mixedNotes} />
</td>
<td className='pl-6 pb-2 pt-2'>
{allDrafts
Expand Down

0 comments on commit 96bd8fb

Please sign in to comment.