diff --git a/src/Markdig/Extensions/Tables/GridTableParser.cs b/src/Markdig/Extensions/Tables/GridTableParser.cs index 173dc014..0dc268fa 100644 --- a/src/Markdig/Extensions/Tables/GridTableParser.cs +++ b/src/Markdig/Extensions/Tables/GridTableParser.cs @@ -256,7 +256,7 @@ private BlockState HandleContents(BlockProcessor processor, GridTableState table { sliceForCell.End = line.Start + columnEnd - 1; } - else if (line.PeekCharExtra(line.End) == '|') + else if (line.PeekCharExtra(line.End - line.Start) == '|') { sliceForCell.End = line.End - 1; }