diff --git a/src/Markdig/Helpers/StringSlice.cs b/src/Markdig/Helpers/StringSlice.cs index aa1045db..6edca548 100644 --- a/src/Markdig/Helpers/StringSlice.cs +++ b/src/Markdig/Helpers/StringSlice.cs @@ -507,15 +507,8 @@ namespace Markdig.Helpers { return false; } - if (Start <= other.End) - { - return true; - } - if (End <= other.Start) - { - return true; - } - return false; + + return Start <= other.End && End >= other.Start; } } -} \ No newline at end of file +}