Skip to content

Commit

Permalink
[field] PT: make sure to render trailing spaces correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
skogsmaskin authored and rexxars committed Oct 6, 2020
1 parent ed57684 commit 3cb32f7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function renderWithMarks({
if (seg.text === '\n') {
return <br />
}
let returned = <>{seg.text}</>
let returned = <>{seg.text.replace(/ /g, '\u00A0')}</> // Make sure we render trailing spaces correctly
const spanDiff = child && findSpanDiffFromChild(diff.origin, child)
const textDiff = spanDiff?.fields?.text ? (spanDiff?.fields?.text as StringDiff) : undefined
const marksDiff = spanDiff?.fields?.marks ? (spanDiff?.fields?.marks as ArrayDiff) : undefined
Expand Down

0 comments on commit 3cb32f7

Please sign in to comment.