Skip to content

Commit

Permalink
enhance(data-page): trim text fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Nov 1, 2023
1 parent 9735c6e commit 97d642c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ export const IndicatorDescriptions = (props: IndicatorDescriptionsProps) => {
<div className="key-info__content simple-markdown-text">
{props.descriptionKey.length === 1 ? (
<SimpleMarkdownText
text={props.descriptionKey[0]}
text={props.descriptionKey[0].trim()}
/>
) : (
<ul>
{props.descriptionKey.map((item, i) => (
{props.descriptionKey.map((text, i) => (
<li key={i}>
<SimpleMarkdownText text={item} />{" "}
<SimpleMarkdownText
text={text.trim()}
/>{" "}
</li>
))}
</ul>
Expand Down Expand Up @@ -59,7 +61,7 @@ export const IndicatorDescriptions = (props: IndicatorDescriptionsProps) => {
content={
<div className="simple-markdown-text">
<SimpleMarkdownText
text={props.descriptionFromProducer}
text={props.descriptionFromProducer.trim()}
/>
</div>
}
Expand All @@ -75,7 +77,7 @@ export const IndicatorDescriptions = (props: IndicatorDescriptionsProps) => {
content={
<div className="simple-markdown-text">
<SimpleMarkdownText
text={props.additionalInfo}
text={props.additionalInfo.trim()}
/>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const IndicatorProcessing = (props: IndicatorProcessingProps) => {
<div className="variable-processing-info__description">
<p className="simple-markdown-text">
<SimpleMarkdownText
text={props.descriptionProcessing}
text={props.descriptionProcessing.trim()}
/>
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const SourceContent = (props: {
<div className="source-content">
{source.description && (
<p className="description simple-markdown-text">
<SimpleMarkdownText text={source.description} />
<SimpleMarkdownText text={source.description.trim()} />
</p>
)}
{showKeyInfo && (
Expand Down Expand Up @@ -103,7 +103,7 @@ const SourceContent = (props: {
</a>{" "}
below.
<CodeSnippet
code={source.citationFull}
code={source.citationFull.trim()}
theme="light"
/>
</div>
Expand Down
4 changes: 1 addition & 3 deletions site/DataPageV2Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,7 @@ export const DataPageV2Content = ({
</div>
<p className="about-this-data__indicator-description simple-markdown-text">
<SimpleMarkdownText
text={
datapageData.descriptionShort
}
text={datapageData.descriptionShort.trim()}
/>
</p>
</>
Expand Down

0 comments on commit 97d642c

Please sign in to comment.