Skip to content

Commit

Permalink
Fix replacement issue when replacement is at the end of the segment
Browse files Browse the repository at this point in the history
  • Loading branch information
ealbu committed Sep 12, 2024
1 parent 235d1a0 commit c04f447
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ public static void Replace(this ISegment segment, int startIndex, int endPositio

break;
}

if (currentIndex <= startIndex && currentIndex + elementLength == endPosition)
{
var beforeText = textElement.Properties.Text.Substring(0, startIndex - currentIndex);
textElement.Properties.Text = beforeText + replacementText;
}

currentIndex += elementLength;
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.3.0")]
[assembly: AssemblyFileVersion("4.0.3.1")]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PluginPackage xmlns="http://www.sdl.com/Plugins/PluginPackage/1.0">
<PlugInName>Antidote Verifier</PlugInName>
<Version>4.0.3.0</Version>
<Version>4.0.3.1</Version>
<Description>Studio verifier that will verify the text in Antidote</Description>
<Author>Trados AppStore Team</Author>
<RequiredProduct name="TradosStudio" minversion="18.0" maxversion="18.9" />
Expand Down

0 comments on commit c04f447

Please sign in to comment.