Skip to content

Commit

Permalink
Merge pull request #708 from eth-brownie/fix-multiple-pragmas
Browse files Browse the repository at this point in the history
fix: multiple pragma statements
  • Loading branch information
iamdefinitelyahuman authored Aug 2, 2020
2 parents 9464474 + 0e70bb9 commit 40bc052
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brownie/project/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def get_contract_names(full_source: str) -> List:
comment_regex = r"(?:\s*\/\/[^\n]*)|(?:\/\*[\s\S]*?\*\/)"
uncommented_source = re.sub(comment_regex, "", full_source)
contracts = re.findall(
r"((?:abstract contract|contract|library|interface)\s[^;{]*{[\s\S]*?})\s*(?=(?:abstract contract|contract|library|interface)\s|$)", # NOQA: E501
r"((?:abstract contract|contract|library|interface)\s[^;{]*{[\s\S]*?})\s*(?=(?:abstract contract|contract|library|interface|pragma)\s|$)", # NOQA: E501
uncommented_source,
)

Expand Down

0 comments on commit 40bc052

Please sign in to comment.