Upstream xoofx/markdig state of the touched files before 9b3347d720
This commit is contained in:
1 parent
ad32938cc0
commit
10ebd55fd4
4 files changed
-66
No files matched your search
@@ -150,13 +150,6 @@ public class LinkInlineParser : InlineParser
|
||||
return false;
|
||||
}
|
||||
|
||||
// An implicit definition must not hijack a bracket nested inside a
|
||||
// still-open link, which would break the outer one.
|
||||
if (!linkRef.AllowResolutionInsideOpenLink && HasActiveAncestorLink(parent))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Inline? link = null;
|
||||
// Try to use a callback directly defined on the LinkReferenceDefinition
|
||||
if (linkRef.CreateLinkInline != null)
|
||||
@@ -437,24 +430,6 @@ public class LinkInlineParser : InlineParser
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the delimiter is nested inside another link/image
|
||||
/// delimiter that may still resolve.
|
||||
/// </summary>
|
||||
private static bool HasActiveAncestorLink(LinkDelimiterInline delimiter)
|
||||
{
|
||||
var inline = delimiter.Parent;
|
||||
while (inline != null)
|
||||
{
|
||||
if (inline is LinkDelimiterInline { IsActive: true })
|
||||
{
|
||||
return true;
|
||||
}
|
||||
inline = inline.Parent;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static void MarkParentAsInactive(Inline? inline)
|
||||
{
|
||||
while (inline != null)
|
||||
|
||||
Reference in new issue
Block a user