Skip to content

Commit

Permalink
Issue #996: fix detail text content
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzov96 committed May 24, 2024
1 parent 7e56606 commit 885ce3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export function DetailTextContent<E>({
}: DetailTextContentProps<E>) {
const hihglithTextLines = result.highlight[path];
const text = get(result.source, path);
if (!text || typeof text !== "string") return null;
const textWithBreaksAndTabsAndCarriageReturns = text
.replace(/\r/g, "")
.replace(/\n/g, "<br />")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function DetailTextContentTwo<E>({
}: DetailTextContentProps<E>) {
const hihglithTextLines = result.highlight[path];
const text = get(result.source, path);
if (!text || typeof text !== "string") return null;
const textWithBreaksAndTabsAndCarriageReturns = text
.replace(/\r/g, "")
.replace(/\n/g, "<br />")
Expand Down

0 comments on commit 885ce3d

Please sign in to comment.