You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Changed lines in diff:<lang> blocks are visually unmarkedΒ #4109
Prism.highlight('-let a = 1;\n+const a = 1;\n','diff:javascript');
<spanclass="token deleted-sign deleted"><spanclass="token prefix deleted">-</span><spanclass="token keyword">let</span> a <spanclass="token operator">=</span><spanclass="token number">1</span></span>
let, = and 1 carry their own JavaScript colors, so the deleted foreground color set by every theme reaches only the spaces between them. Plain diff is unaffected β there are no inner tokens to override it.
Default rendering never used it, so only users who opted in lost anything.
Notes for whoever fixes this
The selector still matches the new output unchanged: diff.js:38 derives the deleted/inserted alias from the token name, so deleted-sign and deleted-arrow both carry it and :not(.prefix) still excludes the markers.
color: inherit is load-bearing β without it the inner language's colors are lost.
Consecutive changed lines are a single token, so display: block paints one block per run, not per line.
A CSS-only plugin is not possible today: scripts/build.js:150 and :414 both require plugins/<id>/<id>.js.
diff:diff:<lang> nests the wrappers, so any background stacks.
If this moves into the default theme, funky.css previously overrode it with a stronger background and display: inline.
Activity
Mark changed lines in diff blocks with a background
Mark changed lines in diff blocks with a background
Mark changed lines in diff blocks with a background