Skip to content

Commit

Permalink
docs: change <dl> indent in generated markdown (#5742)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Jun 13, 2024
1 parent 6e200f9 commit 8c6dc9d
Show file tree
Hide file tree
Showing 3 changed files with 6,443 additions and 4,396 deletions.
18 changes: 11 additions & 7 deletions website/_scripts/extract-properties.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,22 @@ function formatTypeEntryBody(entry) {
dlDescription = removeLeftPad(`
<dt>Description</dt>
<dd>
${padLines(dlDescription, ' ')}
${padLines(dlDescription, ' ')}
</dd>
`);
}

return removeLeftPad(`
<dl>
${padLines(dlDescription, ' ')}
<dt>Type</dt>
<dd>
${formatEntryType(entry)}
</dd>
${padLines(dlDescription, ' ')}
<dt>Type</dt>
<dd>
${formatEntryType(entry)}
</dd>
</dl>
`);
}
Expand All @@ -138,7 +142,7 @@ function formatEntryType(entry, addFix = '`') {
}

if (entry.type === 'array' && entry.items) {
return formatEntryType(entry.items, '`') + fix(`[]`);
return formatEntryType(entry.items, '`') + '&ZeroWidthSpace;' + fix(`[]`);
}
if (entry.type) {
return fix(entry.type);
Expand Down
File renamed without changes.
Loading

0 comments on commit 8c6dc9d

Please sign in to comment.