diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-14 21:08:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-14 21:08:31 +0300 |
commit | 06ac12d53c3f0b7cee2755a1254bf1af05d55044 (patch) | |
tree | 95d0be0bd751a22d6135f496c425c44d774fbe54 /app/models/blob_viewer | |
parent | b689f371350fbf1b71f266764ee018befc9b91f7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/blob_viewer')
-rw-r--r-- | app/models/blob_viewer/go_mod.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/blob_viewer/go_mod.rb b/app/models/blob_viewer/go_mod.rb index ae57e2c0526..d4d117f899c 100644 --- a/app/models/blob_viewer/go_mod.rb +++ b/app/models/blob_viewer/go_mod.rb @@ -5,13 +5,13 @@ module BlobViewer include ServerSide include Gitlab::Utils::StrongMemoize - MODULE_REGEX = / + MODULE_REGEX = %r{ \A (?# beginning of file) module\s+ (?# module directive) (?<name>.*?) (?# module name) - \s*(?:\/\/.*)? (?# comment) + \s*(?://.*)? (?# comment) (?:\n|\z) (?# newline or end of file) - /x.freeze + }x.freeze self.file_types = %i(go_mod go_sum) |