Split separate lines of schema descriptions but good (#762)

did idiot's thing but properly do line breaks
This commit is contained in:
Ben C 2023-12-28 19:25:41 -05:00 committed by GitHub
commit 1aee1a9ea8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ const refSlug = SchemaTools.getRefSlug(schema);
const enumVals = SchemaTools.getEnumValues(schema);
const props = SchemaTools.getProps(schema, level);
const descSplit = description?.toString().split(" \n").map(l => l.trim()).filter(l => l.length !== 0);
const descSplit = description?.toString().split("\n");
const HeadingTag = levelMap[level] ?? "h6";
---
@ -62,7 +62,7 @@ const HeadingTag = levelMap[level] ?? "h6";
</div>
)
}
{descSplit?.map(l => <p>{l}</p>) ?? <p>No Description Found</p>}
<p>{descSplit?.map(l => <>{l}<br></>) ?? <>No Description Found</>}</p>
{
enumVals.length !== 0 && (
<>