MCPcopy
hub / github.com/tailwindlabs/prettier-plugin-tailwindcss / reprint

Function reprint

src/index.ts:1183–1198  ·  view source on GitHub ↗
(path, { options, changes })

Source from the content-addressed store, hash-verified

1181 transform: transformSvelte,
1182
1183 reprint(path, { options, changes }) {
1184 if (options.__mutatedOriginalText) return
1185 options.__mutatedOriginalText = true
1186
1187 if (!changes?.length) return
1188
1189 let finder = lineColumn(options.originalText)
1190
1191 let stringChanges: StringChange[] = changes.map((change) => ({
1192 ...change,
1193 start: finder.toIndex(change.start.line, change.start.column + 1),
1194 end: finder.toIndex(change.end.line, change.end.column + 1),
1195 }))
1196
1197 options.originalText = spliceChangesIntoString(options.originalText, stringChanges)
1198 },
1199})
1200
1201type AstroNode =

Callers 1

applyFunction · 0.85

Calls 1

spliceChangesIntoStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…