Skip to content

Commit

Permalink
fix: multiple pragma statements
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Aug 2, 2020
1 parent 9464474 commit 0e70bb9
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 0e70bb9

Please sign in to comment.