Skip to content

Commit

Permalink
respect line breaks in project/entity descriptions (#1439)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarosenb authored Sep 18, 2024
1 parent 2274548 commit 1f3e1bc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export const BaseProjectDetails: React.FC<{
{projectValue.description && (
<DescriptionExpander>
<strong>Description: </strong>
{projectValue.description}
<p className="render-linebreaks">{projectValue.description}</p>
</DescriptionExpander>
)}
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export const PublishedEntityDetails: React.FC<{
</table>
<DescriptionExpander>
<strong>Description: </strong>
{entityValue.description}
<p className="render-linebreaks">{entityValue.description}</p>
</DescriptionExpander>
</section>
);
Expand Down
4 changes: 3 additions & 1 deletion client/modules/datafiles/src/projects/SubEntityDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ export const SubEntityDetails: React.FC<{
</table>
<DescriptionExpander>
<strong>Description: </strong>
{entityValue.description || '(N/A)'}
<p className="render-linebreaks">
{entityValue.description || '(N/A)'}
</p>
</DescriptionExpander>
</section>
);
Expand Down
4 changes: 4 additions & 0 deletions client/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
flex: 2;
}

.render-linebreaks {
white-space: pre-line;
}

.inner-form-item {
margin-bottom: 0;
}
Expand Down

0 comments on commit 1f3e1bc

Please sign in to comment.