Skip to content

Commit ca00b3f

Browse files
committed
remove tabs from function comments
1 parent a5be1c8 commit ca00b3f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/parse/package.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"go/token"
77
"os"
88
"regexp"
9+
"strings"
910
)
1011

1112
var (
@@ -33,6 +34,9 @@ func NewPackageDoc(dir string) (*doc.Package, error) {
3334
func setDocFuncsMap(pkgDoc *doc.Package) {
3435
funcsMap = make(map[string]*doc.Func, len(pkgDoc.Funcs))
3536
for _, fn := range pkgDoc.Funcs {
37+
// replace any \t character in comment with spaces
38+
// because apiary parser cannot handle tabs
39+
fn.Doc = strings.Replace(fn.Doc, "\t", " ", -1)
3640
funcsMap[fn.Name] = fn
3741
}
3842
}

0 commit comments

Comments
 (0)