Remove additional condition, since a carriage return constitute a line ending regardless of whether it is followed by a line feed or not.

This commit is contained in:
Sergey Nozhenko
2024-12-21 06:56:23 +03:00
parent 90bc15c016
commit ab8e85b06e

View File

@@ -1129,7 +1129,7 @@ public static class LinkHelper
c = text.NextChar();
}
if (c != '\0' && c != '\n' && (c != '\r' || text.PeekChar() != '\n'))
if (c != '\0' && c != '\n' && c != '\r')
{
// If we were able to parse the url but the title doesn't end with space,
// we are still returning a valid definition
@@ -1269,7 +1269,7 @@ public static class LinkHelper
c = text.NextChar();
}
if (c != '\0' && c != '\n' && (c != '\r' || text.PeekChar() != '\n'))
if (c != '\0' && c != '\n' && c != '\r')
{
// If we were able to parse the url but the title doesn't end with space,
// we are still returning a valid definition