Fix autocorrection of the first letter in table cell
This commit is contained in:
Ilya Kirillov
2024-09-19 14:59:14 +03:00
parent 9c25883525
commit 2a54664e12
2 changed files with 6 additions and 12 deletions

View File

@ -57,8 +57,6 @@ $(function ()
assert.strictEqual(AscTest.GetParagraphText(p), checkText + " ", text + " -> " + checkText);
}
QUnit.test("Test: capitalize first letter of the sentence", function (assert)
{
logicDocument.SetAutoCorrectFirstLetterOfSentences(true);

View File

@ -769,17 +769,13 @@
if (!this.AsYouType)
return false;
if (!oDocument.IsAutoCorrectFirstLetterOfSentences())
let isCellFistLetter = (oRunElementsBefore.IsEnd() && oParagraph.IsTableCellContent());
if ((isCellFistLetter && !oDocument.IsAutoCorrectFirstLetterOfCells())
|| (!isCellFistLetter && !oDocument.IsAutoCorrectFirstLetterOfSentences()))
return false;
if (oRunElementsBefore.IsEnd()
&& oParagraph.IsTableCellContent()
&& !oDocument.IsAutoCorrectFirstLetterOfCells())
{
return false;
}
if ("www" === sText || "http" === sText || "https" === sText)
return false;