diff --git a/src/Markdig/Helpers/StringLineGroup.cs b/src/Markdig/Helpers/StringLineGroup.cs index 80a31059..cef3f603 100644 --- a/src/Markdig/Helpers/StringLineGroup.cs +++ b/src/Markdig/Helpers/StringLineGroup.cs @@ -187,7 +187,7 @@ public void Trim() } } - private struct Enumerator : IEnumerator + public struct Enumerator : IEnumerator { private readonly StringLineGroup _parent; private int _index; @@ -210,12 +210,17 @@ public void Reset() _index = -1; } } - - IEnumerator IEnumerable.GetEnumerator() + + public Enumerator GetEnumerator() { return new Enumerator(this); } + IEnumerator IEnumerable.GetEnumerator() + { + (IEnumerator)GetEnumerator(); + } + private void IncreaseCapacity() { var newItems = _pool.Rent(Lines.Length * 2); @@ -468,4 +473,4 @@ public LineOffset(int linePosition, int column, int offset, int start, int end) public readonly int End; } -} \ No newline at end of file +}