Skip to content

Commit e8581d0

Browse files
committed
Another small fix for meta description of challenges
1 parent 7d5e352 commit e8581d0

File tree

1 file changed

+5
-1
lines changed
  • src/shared/containers/challenge-detail

1 file changed

+5
-1
lines changed

src/shared/containers/challenge-detail/index.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ class ChallengeDetailPageContainer extends React.Component {
128128

129129
let description = challenge.introduction || challenge.detailedRequirements;
130130
description = description ? description.slice(0, 256) : '';
131-
description = htmlToText.fromString(description, { wordwrap: false });
131+
description = htmlToText.fromString(description, {
132+
singleNewLineParagraphs: true,
133+
wordwrap: false,
134+
});
135+
description = description.replace(/\n/g, ' ');
132136

133137
const results = resultsLoadedForChallengeId === _.toString(challengeId)
134138
? this.props.results : null;

0 commit comments

Comments
 (0)