asbjornenge / Docker.tmbundle

Dockerfile syntax
MIT License
75 stars 27 forks source link

Prevent confusion with Python files #25

Closed blag closed 5 years ago

blag commented 6 years ago

The previous first line match regex was too liberal - it matched with Python files that began with from ... import .... This modifies the first line match regex to include a negative lookahead assertion that prevents matching if import is found. This does not create any more false negatives, because the import keyword is only expected after exactly one non-whitespace token, which is impossible in a syntactically correct Dockerfile.

blag commented 5 years ago

Bump.

Hey @asbjornenge - I see from #16 that you're a little swamped. Do you mind adding me as a maintainer so I can merge this (and the regex from #16) in? Thanks!

asbjornenge commented 5 years ago

@blag done! Thanks 👍❤️

Please feel free to look at any other PRs and Issues too. To be frank some of this is getting a bit over my head 🙈 I made it way back when Dockerfiles first was a thing and I'm not really a regex guy at all 😛

blag commented 5 years ago

Thanks, I'll do what I can! ❤️