Skip to content

Fix LT-22586: Normalize Word export content to NFC#970

Open
jasonleenaylor wants to merge 1 commit into
mainfrom
bugfix/LT-22586
Open

Fix LT-22586: Normalize Word export content to NFC#970
jasonleenaylor wants to merge 1 commit into
mainfrom
bugfix/LT-22586

Conversation

@jasonleenaylor

@jasonleenaylor jasonleenaylor commented Jun 25, 2026

Copy link
Copy Markdown
Contributor
  • Normalize the OpenXML <w:t> run text in place (new DocFragment.NormalizeText) and the letter-header string
  • Add regression tests GenerateWordDocForEntry_GeneratesNFC and GenerateLetterHeaderDocFragment_GeneratesNFC

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com


This change is Reviewable

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   10m 2s ⏱️ -20s
4 296 tests +2  4 223 ✅ +2  73 💤 ±0  0 ❌ ±0 
4 305 runs  +2  4 232 ✅ +2  73 💤 ±0  0 ❌ ±0 

Results for commit ba60895. ± Comparison against base commit 44de757.

♻️ This comment has been updated with latest results.

//SUT
var result = ConfiguredLcmGenerator.GenerateContentForEntry(entry, mainEntryNode, null, DefaultSettings, 0) as DocFragment;
Assert.That(result, Is.Not.Null, "Results should have been generated");
var tsResult = TsStringUtils.MakeString(result.ToString(), wsKo);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason we convert it into a ts string before testing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not really. It has a symmetry with the code setting the string in the model but it doesn't add any value. It is correct code with an unnecessary wrapper. I'll simplify it since you asked and made me think about it. :)

//SUT
var result = ConfiguredLcmGenerator.GenerateContentForEntry(entry, mainEntryNode, null, DefaultSettings, 0) as DocFragment;
Assert.That(result, Is.Not.Null, "Results should have been generated");
var tsResult = TsStringUtils.MakeString(result.ToString(), wsKo);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not really. It has a symmetry with the code setting the string in the model but it doesn't add any value. It is correct code with an unnecessary wrapper. I'll simplify it since you asked and made me think about it. :)

* Normalize the OpenXML <w:t> run text in place (new
  DocFragment.NormalizeText) and the letter-header string

* Add regression tests GenerateWordDocForEntry_GeneratesNFC
  and GenerateLetterHeaderDocFragment_GeneratesNFC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants