diff --git a/scripts/is_contract.sh b/scripts/is_contract.sh index 2a7dce0d696..389d3764567 100755 --- a/scripts/is_contract.sh +++ b/scripts/is_contract.sh @@ -43,7 +43,7 @@ if [ -z "$SOURCE_PATH" ]; then fi # Check for the #[ink::contract] macro in the source file -if grep -qE '^#\[(::)?ink::contract([^]]*)\]' "$SOURCE_PATH"; then +grep -q '#\s*\[\(::\)\?ink::contract' "$SOURCE_PATH"; then exit 0 else exit 1