Download mods/diff/tests/fixtures/code-blocks-of/wide-hunk.ts from SaylorTwift/claude-code: direct link, hf CLI and curl.
- Browser
- Download file 728 Bytes
-
https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/tests/fixtures/code-blocks-of/wide-hunk.ts
- Command line
-
hf download hf://SaylorTwift/claude-code/mods/diff/tests/fixtures/code-blocks-of/wide-hunk.ts
-
curl -L -o wide-hunk.ts https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/tests/fixtures/code-blocks-of/wide-hunk.ts
728 Bytes
| import type Git from '../../../hooks/git' | |
| import { WIDE_LINE_LETTERS } from './wide-line-letters.js' | |
| /** | |
| * A hunk of wide lines cycling context, removed and added: at its defaults | |
| * two share a `Code` and three do not. | |
| * | |
| * @param start the first line's number on both sides | |
| * @param count how many lines | |
| * @param letter the character each line repeats WIDE_LINE_LETTERS times | |
| * @returns the hunk | |
| */ | |
| export function wideHunk(start = 1, count = 40, letter = 'x'): Git.Hunk { | |
| const markers = [' ', '-', '+'] | |
| return { | |
| oldStart: start, | |
| newStart: start, | |
| lines: Array.from( | |
| { length: count }, | |
| (_, row) => | |
| `${markers[row % markers.length]}${letter.repeat(WIDE_LINE_LETTERS)}`, | |
| ), | |
| } | |
| } | |