Skip to content

Commit 5b85bab

Browse files
committed
fix(diff): preserve heading-level changes in comparisons
1 parent a76dfe0 commit 5b85bab

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎apps/sim/components/diff/diff-view.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ function LineText({ line, segments, prose }: LineTextProps) {
155155
return (
156156
<p className={cn(prefix && 'font-medium text-[var(--text-primary)]')}>
157157
<span className='sr-only'>{changeLabel}</span>
158+
{prefix && (
159+
<span className='font-mono text-[var(--text-muted)] text-caption'>
160+
<HighlightedText text={prefix} offset={0} segments={segments} type={line.type} />
161+
</span>
162+
)}
158163
{text.split(INLINE_MARKDOWN).map((part, index) => {
159164
const bold = part.startsWith('**') && part.endsWith('**') && part.length > 4
160165
const code = part.startsWith('`') && part.endsWith('`') && part.length > 2

0 commit comments

Comments
 (0)