Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Nov 28, 2022
1 parent cf949ca commit 0ed36e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sites/kit.svelte.dev/src/lib/docs/client/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ pre.language-diff code {
}

.ts-block-property-details {
padding: 0 1rem;
padding: 0 1rem 0 2rem;
}

.ts-block-property-details blockquote {
Expand Down
5 changes: 1 addition & 4 deletions sites/kit.svelte.dev/src/lib/docs/server/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ function fence(code, lang = 'dts') {
* @param {import('./types').Type} member
*/
function stringify(member) {
// @ts-ignore
const doc = member.jsDoc?.[0];

const bullet_block =
member.bullets.length > 0
? `\n\n<div class="ts-block-property-bullets">\n\n${member.bullets.join('\n')}</div>`
Expand All @@ -150,7 +147,7 @@ function stringify(member) {
`<div class="ts-block-property-details">\n\n` +
bullet_block +
'\n\n' +
(doc?.comment ?? '')
member.comment
.replace(/\/\/\/ type: (.+)/g, '/** @type {$1} */')
.replace(/^( )+/gm, (match, spaces) => {
return '\t'.repeat(match.length / 2);
Expand Down

0 comments on commit 0ed36e1

Please sign in to comment.