bottle: add: improve regexp to recognize comments

This would have eliminated the need for Homebrew/homebrew-core#9000, for
instance.
This commit is contained in:
Zhiming Wang 2017-01-17 10:16:35 -05:00
parent a5019d281e
commit 42486c1181
No known key found for this signature in database
GPG Key ID: 5B58F95EC95965D8

View File

@ -435,6 +435,7 @@ module Homebrew
else
string = s.sub!(
/(
(\ {2}\#[^\n]*\n)* # comments
\ {2}( # two spaces at the beginning
(url|head)\ ['"][\S\ ]+['"] # url or head with a string
(