Skip to content

Commit

Permalink
Remove additional condition, since a carriage return constitute a lin…
Browse files Browse the repository at this point in the history
…e ending regardless of whether it is followed by a line feed or not.
  • Loading branch information
snnz committed Dec 21, 2024
1 parent 90bc15c commit ab8e85b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Markdig/Helpers/LinkHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ public static bool TryParseLinkReferenceDefinition<T>(ref T text,
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
Expand Down Expand Up @@ -1269,7 +1269,7 @@ public static bool TryParseLinkReferenceDefinitionTrivia<T>(
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
Expand Down

0 comments on commit ab8e85b

Please sign in to comment.