Skip to content

Commit

Permalink
allow newlines in the space
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed May 2, 2024
1 parent 7c9a4c0 commit bf9982c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/_shared/components/card-text/card-text.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ export class CardTextComponent {
}

private fixText(): string {
return (this.text() ?? '').split('+').join('\\+').split('-').join('\\-');
return (this.text() ?? '')
.split('\n')
.join('<br>')
.split('+')
.join('\\+')
.split('-')
.join('\\-');
}

private getCustomRenderer(): marked.Renderer {
Expand Down

0 comments on commit bf9982c

Please sign in to comment.