Skip to content

Commit 8516373

Browse files
saphidclaude
andcommitted
fix(server): document text skips paragraph tab-stop settings
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 100dab8 commit 8516373

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎apps/server/src/provider/documentTextWorker.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const CELL_END = Symbol("cell-end");
1414
type TextPart = string | typeof CELL_START | typeof CELL_END | { fallback: string };
1515

1616
const TRUNCATED = "\n\n[Extracted text truncated at document extraction limits.]";
17-
// Parts the document never displays: tracked deletions and moves, field codes, phonetic guides.
17+
// Parts the document never displays: tracked deletions and moves, field codes, phonetic guides,
18+
// paragraph properties such as tab-stop definitions.
1819
const HIDDEN = new Set([
1920
"script",
2021
"style",
@@ -25,6 +26,7 @@ const HIDDEN = new Set([
2526
"instrText",
2627
"delInstrText",
2728
"tracked-changes",
29+
"pPr",
2830
]);
2931

3032
class Truncation extends Error {}

‎apps/server/src/provider/userInputAttachments.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,9 @@ describe("question answer paths", () => {
577577
bounded: true,
578578
parts: {
579579
"word/document.xml":
580-
'<w:document xmlns:w="urn:w"><w:body><w:p><w:r><w:t>Intro</w:t></w:r><w:r><w:fldChar w:fldCharType="begin"/></w:r><w:r><w:instrText> PAGEREF _Toc1 \\h </w:instrText></w:r><w:r><w:fldChar w:fldCharType="separate"/></w:r><w:r><w:t> 3</w:t></w:r><w:r><w:fldChar w:fldCharType="end"/></w:r></w:p><w:p><w:r><w:t xml:space="preserve">Fee </w:t></w:r><w:del><w:r><w:delText>$500</w:delText></w:r></w:del><w:ins><w:r><w:t>$700</w:t></w:r></w:ins><w:moveFrom><w:r><w:t>Moved</w:t></w:r></w:moveFrom></w:p></w:body></w:document>',
580+
'<w:document xmlns:w="urn:w"><w:body><w:p><w:r><w:t>Intro</w:t></w:r><w:r><w:fldChar w:fldCharType="begin"/></w:r><w:r><w:instrText> PAGEREF _Toc1 \\h </w:instrText></w:r><w:r><w:fldChar w:fldCharType="separate"/></w:r><w:r><w:t> 3</w:t></w:r><w:r><w:fldChar w:fldCharType="end"/></w:r></w:p><w:p><w:pPr><w:tabs><w:tab w:val="right" w:pos="9350"/></w:tabs></w:pPr><w:r><w:t xml:space="preserve">Fee </w:t></w:r><w:del><w:r><w:delText>$500</w:delText></w:r></w:del><w:ins><w:r><w:t>$700</w:t></w:r></w:ins><w:moveFrom><w:r><w:t>Moved</w:t></w:r></w:moveFrom><w:r><w:tab/><w:t>due</w:t></w:r></w:p></w:body></w:document>',
581581
},
582-
expected: ["Intro 3\nFee $700"],
582+
expected: ["Intro 3\nFee $700\tdue"],
583583
absent: ["PAGEREF", "$500", "Moved"],
584584
},
585585
{

0 commit comments

Comments
 (0)