diff --git a/app/src/components/CodeDiff.tsx b/app/src/components/CodeDiff.tsx index 479b6e5..b4d8a05 100644 --- a/app/src/components/CodeDiff.tsx +++ b/app/src/components/CodeDiff.tsx @@ -27,17 +27,20 @@ class CodeDiff extends React.Component { const changedLines = change.count || 0 if (hasStyledCode && this.props.language === 'json') { const currentLines = styledLines.slice(lineNumber, lineNumber + changedLines) - const lines = currentLines.map((l, k) => { - return
+ const lines = currentLines.map((l, idx) => { + return
}) lineNumber += changedLines return
{lines}
} - return change.value.trim().split('\n').map((line, idx) => { - return
{line}
- }) + return change.value + .slice(0, -1) // Remove trailing newline + .split('\n') + .map((line, idx) => { + return
{line}
+ }) }) return ( @@ -69,6 +72,9 @@ const style = (theme: Theme) => { // width: '8px', } return { + line: { + lineHeight: 'normal', + }, codeBlock: { fontSize: '12px', maxHeight: '200px', @@ -78,7 +84,6 @@ const style = (theme: Theme) => { ...baseStyle, '&:before': { ...before, - // content: "' '", }, }, deletion: {