From 3e26cf5e2f6f1f32185a2a7b402491ffca208463 Mon Sep 17 00:00:00 2001 From: mazrean Date: Sat, 30 Nov 2024 16:54:01 +0900 Subject: [PATCH] trim indent --- dbdoc/sql.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dbdoc/sql.go b/dbdoc/sql.go index 2ca62fb..90cd312 100644 --- a/dbdoc/sql.go +++ b/dbdoc/sql.go @@ -104,6 +104,9 @@ func extractSubQueries(_ *Context, sql string) []string { func analyzeSQLWithoutSubQuery(ctx *Context, sqlValue string, pos token.Pos) []Query { sqlValue = strings.TrimLeftFunc(sqlValue, unicode.IsSpace) + sqlValue = strings.TrimFunc(sqlValue, func(r rune) bool { + return r == '\n' || r == '\r' + }) var queries []Query switch {