Skip to content

Commit 2c4f06b

Browse files
authored
Merge branch 'master' into LT22190Comp
2 parents d9f37f6 + 9638a92 commit 2c4f06b

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

src/AssemblyInfo.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>3.7.2</Version>
3+
<Version>3.7.3</Version>
44
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
5-
<AssemblyVersion>3.7.2.0</AssemblyVersion>
6-
<FileVersion>3.7.2.0</FileVersion>
5+
<AssemblyVersion>3.7.3.0</AssemblyVersion>
6+
<FileVersion>3.7.3.0</FileVersion>
77
<Company>SIL Global</Company>
88
<Authors>SIL Global</Authors>
99
<Product>Machine</Product>

src/SIL.Machine/PunctuationAnalysis/QuotationMarkStringMatch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public string PreviousCharacter
7575
if (previousSegment != null && !TextSegment.MarkerIsInPrecedingContext(UsfmMarkerType.Paragraph))
7676
{
7777
return new StringInfo(previousSegment.Text).SubstringByTextElements(
78-
previousSegment.Text.Length - 1,
78+
StringInfo.ParseCombiningCharacters(previousSegment.Text).Length - 1,
7979
1
8080
);
8181
}

tests/SIL.Machine.Tests/PunctuationAnalysis/QuotationMarkStringMatchTests.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,24 @@ public void GetPreviousCharacter()
188188
0,
189189
1
190190
);
191-
;
191+
Assert.IsNull(quotationMarkStringMatch.PreviousCharacter);
192+
192193
quotationMarkStringMatch = new QuotationMarkStringMatch(
193194
new TextSegment.Builder().SetText("\u201c\u201d").Build(),
194195
1,
195196
2
196197
);
197198
Assert.That(quotationMarkStringMatch.PreviousCharacter, Is.EqualTo("“"));
199+
200+
quotationMarkStringMatch = new QuotationMarkStringMatch(
201+
new TextSegment.Builder()
202+
.SetText("\"उत्पत्ति पुस्तकले")
203+
.SetPreviousSegment(new TextSegment.Builder().SetText("उत्पत्ति पुस्तकले").Build())
204+
.Build(),
205+
0,
206+
1
207+
);
208+
Assert.That(quotationMarkStringMatch.PreviousCharacter, Is.EqualTo("ले"));
198209
}
199210

200211
[Test]

0 commit comments

Comments
 (0)