MCPcopy Create free account
hub / github.com/vitest-dev/vitest / printCommonLine

Function printCommonLine

packages/utils/src/diff/joinAlignedDiffs.ts:78–96  ·  view source on GitHub ↗
(
  line: string,
  isFirstOrLast: boolean,
  {
    commonColor,
    commonIndicator,
    commonLineTrailingSpaceColor,
    emptyFirstOrLastLinePlaceholder,
  }: DiffOptionsNormalized,
)

Source from the content-addressed store, hash-verified

76}
77
78function printCommonLine(
79 line: string,
80 isFirstOrLast: boolean,
81 {
82 commonColor,
83 commonIndicator,
84 commonLineTrailingSpaceColor,
85 emptyFirstOrLastLinePlaceholder,
86 }: DiffOptionsNormalized,
87): string {
88 return printDiffLine(
89 line,
90 isFirstOrLast,
91 commonColor,
92 commonIndicator,
93 commonLineTrailingSpaceColor,
94 emptyFirstOrLastLinePlaceholder,
95 )
96}
97
98// In GNU diff format, indexes are one-based instead of zero-based.
99function createPatchMark(

Callers 2

pushCommonLineFunction · 0.85
joinAlignedDiffsExpandFunction · 0.85

Calls 1

printDiffLineFunction · 0.85

Tested by

no test coverage detected