From f5070667de10be1a4ba449a67a53356eb192a90b Mon Sep 17 00:00:00 2001 From: Sergey Kozyrenko Date: Tue, 21 Jul 2026 03:59:17 +0700 Subject: [PATCH] test(editor): state the real byte-integrity invariant for GFM cell whitespace The comment claimed no non-backslash byte is lost, but GFM legitimately trims cell-edge and collapsed whitespace, so the test asserts the weaker true invariant: every byte other than backslashes and that trimmed whitespace survives in order. Co-Authored-By: Claude Fable 5 --- .../markdown-editor/markdown-editor-content-integrity.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-content-integrity.test.ts b/frontend/src/components/shared/markdown-editor/markdown-editor-content-integrity.test.ts index 3d92aa0b..a6ea9ccf 100644 --- a/frontend/src/components/shared/markdown-editor/markdown-editor-content-integrity.test.ts +++ b/frontend/src/components/shared/markdown-editor/markdown-editor-content-integrity.test.ts @@ -184,8 +184,8 @@ describe('generative content-integrity — atoms survive load↔serialize across // The doc side of the same class: rich-mode typing can put a backslash run right before a pipe in a cell — // a sequence no markdown load produces (marked's splitter consumes one `\` per escaped pipe). GFM cannot // encode an odd run + pipe exactly, so the serializer pads it by one backslash; assert over random `\`/`|` - // payloads that the padded save is byte-stable immediately, both cells survive, and no non-backslash byte - // is lost or reordered. + // payloads that the padded save is byte-stable immediately, both cells survive, and every byte other than + // backslashes and cell-edge/collapsed whitespace (which GFM legitimately trims) survives in order. it( 'typed backslash/pipe cell payloads keep the table intact and converge on the first save', { timeout: 30000 },