Files
angular/adev/shared-docs/components
Kam cd033e5f12 fix(docs-infra): copy code blocks as they are rendered
The copy button read the whole block's `innerText` and then removed every
`\n\n\n` sequence, which dropped the blank lines between lines of code.
On blocks with line numbers, the same `innerText` also picked up the
number column, so pasting produced "1", the first line, "2", "3" and so
on.

Join the text of the visible `.line` elements instead. Line numbers sit
outside those elements, and lines hidden by an example's visible range
stay hidden, so the clipboard matches what the block shows.

The `.remove` branch goes with it, since no line has carried that class
since 8ec0a4ee5c dropped diff support from docs-code.
2026-09-16 15:41:25 +02:00
..