From a3630e3073628bc91739f1882ef9c6bebe8d409b Mon Sep 17 00:00:00 2001 From: yuin Date: Mon, 19 Sep 2022 20:39:17 +0900 Subject: [PATCH] Fix #323 --- _test/extra.txt | 13 +++++++++++++ parser/fcode_block.go | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/_test/extra.txt b/_test/extra.txt index c5b2ac9..01140fd 100644 --- a/_test/extra.txt +++ b/_test/extra.txt @@ -728,3 +728,16 @@ a

This is a quote.

//= = = = = = = = = = = = = = = = = = = = = = = =// + +57: Tabbed fenced code block within a list +//- - - - - - - - -// +1. + ``` + ``` +//- - - - - - - - -// +
    +
  1. +
    +
  2. +
+//= = = = = = = = = = = = = = = = = = = = = = = =// diff --git a/parser/fcode_block.go b/parser/fcode_block.go index 5914138..e51a35a 100644 --- a/parser/fcode_block.go +++ b/parser/fcode_block.go @@ -83,7 +83,7 @@ func (b *fencedCodeBlockParser) Continue(node ast.Node, reader text.Reader, pc C if line[len(line)-1] != '\n' { newline = 0 } - reader.Advance(segment.Stop - segment.Start - newline - segment.Padding) + reader.Advance(segment.Stop - segment.Start - newline + segment.Padding) return Close } }