Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/imports: use first quote when matching import path
This fixes the regexp used to extract the import path from a line of code when inserting newlines to split a sequence of imports into groups. By using a non-greedy match, the regexp now functions correctly in the face of an extra quote after the import path (such as when there is a trailing comment that includes a quote). Fixes golang/go#51671 Change-Id: Id7fd0b1d794f989d8f3d47336c5b5454cddd6237 GitHub-Last-Rev: b934371 GitHub-Pull-Request: #365 Reviewed-on: https://go-review.googlesource.com/c/tools/+/386914 Reviewed-by: Heschi Kreinick <heschi@google.com> Trust: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
- Loading branch information