From f2f46d6bbd059bc7c3696912c78b4fa8035b984f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?In=C3=A9s=20Nieto?= Date: Wed, 29 Apr 2026 12:26:00 +0200 Subject: [PATCH 1/3] DEV-26859 Replace exactly with exact for lineRule --- lib/properties/src/paragraph-properties.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/properties/src/paragraph-properties.ts b/lib/properties/src/paragraph-properties.ts index dabed25..fc5d036 100644 --- a/lib/properties/src/paragraph-properties.ts +++ b/lib/properties/src/paragraph-properties.ts @@ -52,7 +52,7 @@ export type ParagraphProperties = { before?: Length | null; after?: Length | null; line?: Length | null; - lineRule?: 'atLeast' | 'exactly' | 'auto' | null; + lineRule?: 'atLeast' | 'exact' | 'auto' | null; afterAutoSpacing?: boolean | null; beforeAutoSpacing?: boolean | null; } | null; From 1b4ba0df42b095ef28bccb31b29a489e0b01c03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?In=C3=A9s=20Nieto?= Date: Wed, 29 Apr 2026 16:14:09 +0200 Subject: [PATCH 2/3] add tests --- .../test/paragraph-properties.test.ts | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/lib/properties/test/paragraph-properties.test.ts b/lib/properties/test/paragraph-properties.test.ts index 09c3244..9e39d87 100644 --- a/lib/properties/test/paragraph-properties.test.ts +++ b/lib/properties/test/paragraph-properties.test.ts @@ -114,6 +114,42 @@ describe('Paragraph formatting', () => { ); }); + describe('lineRule "exact"', () => { + test( + ` + + `, + { + spacing: { + before: null, + after: null, + line: twip(240), + lineRule: 'exact', + afterAutoSpacing: false, + beforeAutoSpacing: false, + }, + } + ); + }); + + describe('lineRule "atLeast"', () => { + test( + ` + + `, + { + spacing: { + before: null, + after: null, + line: twip(240), + lineRule: 'atLeast', + afterAutoSpacing: false, + beforeAutoSpacing: false, + }, + } + ); + }); + describe('Legacy "left"/"right"', () => { test( ` From 62c876a7df127ea4b78c38b39fdff325bd9c2490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?In=C3=A9s=20Nieto?= Date: Thu, 30 Apr 2026 12:12:46 +0200 Subject: [PATCH 3/3] angels comment --- .../test/paragraph-properties.test.ts | 54 +++++++------------ 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/lib/properties/test/paragraph-properties.test.ts b/lib/properties/test/paragraph-properties.test.ts index 9e39d87..fe7a704 100644 --- a/lib/properties/test/paragraph-properties.test.ts +++ b/lib/properties/test/paragraph-properties.test.ts @@ -114,41 +114,25 @@ describe('Paragraph formatting', () => { ); }); - describe('lineRule "exact"', () => { - test( - ` - - `, - { - spacing: { - before: null, - after: null, - line: twip(240), - lineRule: 'exact', - afterAutoSpacing: false, - beforeAutoSpacing: false, - }, - } - ); - }); - - describe('lineRule "atLeast"', () => { - test( - ` - - `, - { - spacing: { - before: null, - after: null, - line: twip(240), - lineRule: 'atLeast', - afterAutoSpacing: false, - beforeAutoSpacing: false, - }, - } - ); - }); + for (const lineRule of [null, 'exact', 'atLeast', 'auto'] as const) { + describe(`lineRule "${lineRule}"`, () => { + test( + ` + + `, + { + spacing: { + before: null, + after: null, + line: twip(240), + lineRule, + afterAutoSpacing: false, + beforeAutoSpacing: false, + }, + } + ); + }); + } describe('Legacy "left"/"right"', () => { test(