From cde72d573ada33dc87b5908a80c47e4a75de81f9 Mon Sep 17 00:00:00 2001 From: devnev Date: Sun, 10 Sep 2017 15:18:08 +0100 Subject: [PATCH] Remove indent from formatted examples. The implementation doesn't correctly indent the first line. Since Godoc doesn't indent examples, and the examples are inside a code-block already, the easiest fix seems to be to remove the indent. --- example.go | 1 - 1 file changed, 1 deletion(-) diff --git a/example.go b/example.go index 43087ab..d833045 100644 --- a/example.go +++ b/example.go @@ -86,7 +86,6 @@ func (p *myPres) exampleMDFunc(info *godoc.PageInfo, funcName, indent string) st code = strings.Replace(code, "\n ", "\n", -1) } code = strings.Trim(code, "\n") - code = strings.Replace(code, "\n", "\n\t", -1) buf.WriteString(indent) buf.WriteString("Example:\n\n")