From f929f3e71e96ae11bd421b326d6e12d0ea58858f Mon Sep 17 00:00:00 2001 From: willieho Date: Tue, 5 Mar 2024 22:44:14 +0800 Subject: [PATCH] docs: add documentation for diff truncation options --- docs/config/index.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/config/index.md b/docs/config/index.md index c0d73e06e1aec..7cb86416b1e2b 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -2031,6 +2031,28 @@ export default defineConfig({ ``` ::: +#### diff.truncateThreshold + +- **Type**: `number` +- **Default**: `0` + +The maximum length of diff result to be displayed. Diffs above this threshold will be truncated. +Truncation won't take effect with default value 0. + +#### diff.truncateAnnotation + +- **Type**: `string` +- **Default**: `'... Diff result is truncated'` + +Annotation that is output at the end of diff result if it's truncated. + +#### diff.truncateAnnotationColor + +- **Type**: `DiffOptionsColor = (arg: string) => string` +- **Default**: `noColor = (string: string): string => string` + +Color of truncate annotation, default is output with no color. + ### fakeTimers - **Type:** `FakeTimerInstallOpts`