From 17888093349372f0644f6449f4bf7e086d6e99bc Mon Sep 17 00:00:00 2001 From: oda Date: Fri, 29 May 2015 18:00:38 +0900 Subject: [PATCH] Ignore prefix if start with `.` --- convert.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/convert.go b/convert.go index 632c010..098a19b 100644 --- a/convert.go +++ b/convert.go @@ -229,7 +229,9 @@ func safeFunctionName(name string, knownFuncs map[string]int) string { for i := 0; i < len(inBytes); i++ { if regFuncName.Match([]byte{inBytes[i]}) { - i++ + for j := i; j < len(inBytes) && regFuncName.Match([]byte{inBytes[j]}); j++ { + i++ + } outBytes = append(outBytes, []byte(strings.ToUpper(string(inBytes[i])))...) // bytes[i] = strings.ToUpper(string(byte)) } else {