Included a null check for a two-letter language set in
the HasSentenceEndingCultureNeutralTest in the StringExtensionsTest class. This is to make sure the method uses the culture-neutral characters when the language code is not specified.
Adjusted the inline comment in the StringExtensions.cs file. The change was to reflect the fact that not only '>' but also '}' can be the last char. This change was made to ensure that the commentary appropriately reflects the functionality of the code.
Assertions in StringExtensionsTest.cs were rearranged for better readability and logical grouping. In this change, the test cases which assert that a string does not have a sentence ending are grouped together. This makes it easier to understand and maintain the test cases related to sentence ending checks.
A new test case was added in the 'StringExtensionsTest.cs' to check a scenario where a string does not end with a sentence-ending punctuation. This is essential to ensure the 'HasSentenceEnding()' method handles such scenarios accurately.
This update adds additional test cases in the StringExtensionsTest to ensure sentence ending detection works on italicized strings, both with and without additional HTML font tags. This change will ensure proper sentence ending checks within our text parsing logic.
Previously, only html closing tags (e.g., </i>, </font>) were handled when checking for adjacent sentence-ending characters. This change extends the detection to include assa closing tags (e.g., {\\i0}), improving string manipulation efficiency. This modification will increase the readability and correctness of extracted strings in diverse tag environments."
The culture type evaluation logic was moved to a more suitable location in the code within the StringExtensions file. This change ensures that the culture type is assessed only when it's necessary, avoiding unnecessary operations and leading to optimized performance."
This commit updates the unit tests in StringExtensionsTest.cs to account for more cases of sentence endings. The original tests did not account for edge cases such as having an italic closing tag or an em dash before the end of the sentence which can also signify the end of a sentence. Additionally, corrected an erroneous test that claimed an empty string has a sentence ending, which it doesn't.
This commit changes the index checks in the hyphen and em dash conditions within StringExtensions.cs. Previously, these checks were made at the length (len) of the string value. This could result in inaccurate evaluations, especially for strings with length less than 3 for hyphens and length less than 2 for em dashes. Now, checks are made against 'checkIndex' which should provide more accurate evaluations regardless of the string length."
Changed the return value in the StringExtensions when the string is null or empty. Previously, the function returned true when encountering an empty string which contradicted with its intended behaviour. Now, it correctly returns false when the input string is empty or null, ensuring consistent and reliable usage in future code.
Several FixItem descriptions were updated in the FixCommonErrors.cs source file with clear and specific examples of what each fix does. This will help users understand the changes that are being performed on their subtitles, leading to enhanced usability and a better user experience. This change does not affect functionality, it solely enriches the user interface with more informative text.