atmosphere explorer pds.ls
tool typescript atproto

preserve whitespace in lexicon descriptions

handle.invalid 98171897 72347c54

verified
+15 -7
+15 -7
src/components/lexicon-schema.tsx
··· 318 318 <ConstraintsList property={props.property.items!} /> 319 319 </Show> 320 320 <Show when={props.property.description && !props.hideNameType}> 321 - <p class="text-sm wrap-break-word text-neutral-700 dark:text-neutral-300"> 321 + <p class="text-sm wrap-break-word whitespace-pre-wrap text-neutral-700 dark:text-neutral-300"> 322 322 {props.property.description} 323 323 </p> 324 324 </Show> ··· 475 475 const hasDefContent = () => props.def.refs || props.def.items || hasConstraints(props.def); 476 476 477 477 return ( 478 - <div class="flex flex-col gap-3 scroll-mt-4" id={`def-${props.name}`}> 478 + <div class="flex scroll-mt-4 flex-col gap-3" id={`def-${props.name}`}> 479 479 <div class="group flex items-center gap-2"> 480 480 <a href={`#schema:${props.name}`} class="relative text-lg font-semibold hover:underline"> 481 481 <span class="iconify lucide--link absolute top-1/2 -left-6 -translate-y-1/2 text-base opacity-0 transition-opacity group-hover:opacity-100" /> ··· 487 487 </div> 488 488 489 489 <Show when={props.def.description}> 490 - <p class="text-sm text-neutral-700 dark:text-neutral-300">{props.def.description}</p> 490 + <p class="text-sm whitespace-pre-wrap text-neutral-700 dark:text-neutral-300"> 491 + {props.def.description} 492 + </p> 491 493 </Show> 492 494 493 495 {/* Record key */} ··· 533 535 <span class="text-xs font-semibold text-neutral-500 uppercase dark:text-neutral-400"> 534 536 Detail 535 537 </span> 536 - <p class="text-sm text-neutral-700 dark:text-neutral-300">{props.def.detail}</p> 538 + <p class="text-sm whitespace-pre-wrap text-neutral-700 dark:text-neutral-300"> 539 + {props.def.detail} 540 + </p> 537 541 </div> 538 542 </Show> 539 543 <Show when={props.def["detail:lang"]}> ··· 548 552 <span class="dark:bg-dark-200 w-fit rounded bg-neutral-200/50 px-1.5 py-0.5 font-mono text-xs"> 549 553 {lang} 550 554 </span> 551 - <p class="text-neutral-700 dark:text-neutral-300">{text}</p> 555 + <p class="whitespace-pre-wrap text-neutral-700 dark:text-neutral-300"> 556 + {text} 557 + </p> 552 558 </div> 553 559 )} 554 560 </For> ··· 659 665 <div class="flex flex-col gap-1 py-2"> 660 666 <div class="font-semibold">{error.name}</div> 661 667 <Show when={error.description}> 662 - <p class="text-sm text-neutral-700 dark:text-neutral-300"> 668 + <p class="text-sm whitespace-pre-wrap text-neutral-700 dark:text-neutral-300"> 663 669 {error.description} 664 670 </p> 665 671 </Show> ··· 731 737 </span> 732 738 </div> 733 739 <Show when={props.schema.description}> 734 - <p class="text-sm text-neutral-700 dark:text-neutral-300">{props.schema.description}</p> 740 + <p class="text-sm whitespace-pre-wrap text-neutral-700 dark:text-neutral-300"> 741 + {props.schema.description} 742 + </p> 735 743 </Show> 736 744 </div> 737 745