Skip to content

Add protection from recursion in sequence elements #3

@konard

Description

@konard

protected override IEnumerable<TLink> WalkContents(TLink element)
{
var links = _links;
var parts = links.GetLink(element);
var start = links.Constants.SourcePart;
for (var i = parts.Count - 1; i >= start; i--)
{
var part = parts[i];
if (IsElement(part))
{
yield return part;
}
}
}

FormatStructure method can be used as an example. The idea is to keep track of visited links.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions