aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/yuin/goldmark/parser/fcode_block.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/yuin/goldmark/parser/fcode_block.go')
-rw-r--r--vendor/github.com/yuin/goldmark/parser/fcode_block.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/github.com/yuin/goldmark/parser/fcode_block.go b/vendor/github.com/yuin/goldmark/parser/fcode_block.go
index f5b83eef7b..4801449194 100644
--- a/vendor/github.com/yuin/goldmark/parser/fcode_block.go
+++ b/vendor/github.com/yuin/goldmark/parser/fcode_block.go
@@ -71,6 +71,10 @@ func (b *fencedCodeBlockParser) Open(parent ast.Node, reader text.Reader, pc Con
func (b *fencedCodeBlockParser) Continue(node ast.Node, reader text.Reader, pc Context) State {
line, segment := reader.PeekLine()
fdata := pc.Get(fencedCodeBlockInfoKey).(*fenceData)
+ // if code block line starts with a tab, keep a tab as it is.
+ if segment.Padding != 0 {
+ preserveLeadingTabInCodeBlock(&segment, reader)
+ }
w, pos := util.IndentWidth(line, reader.LineOffset())
if w < 4 {
i := pos