Support comments after environment markers

For example:

    package; python_version < '3'  # Comment

Previously, the environment marker syntax group matched to the end of
the line and didn't stop at the comment character (`#`).
This commit is contained in:
Jon Parise
2020-01-19 09:20:14 -08:00
parent a2be411fa6
commit 51446907b6
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ syn match requirementsPackageName "\v^([a-zA-Z0-9][a-zA-Z0-9\-_\.]*[a-zA-Z0-9])"
syn match requirementsExtras "\v\[\S+\]"
syn match requirementsVersionControls "\v(git\+?|hg\+|svn\+|bzr\+)\S+"
syn match requirementsURLs "\v(\@\s)?(https?|ftp|gopher)://?[^\s/$.?#].\S*"
syn match requirementsEnvironmentMarkers "\v;\s.+$"
syn match requirementsEnvironmentMarkers "\v;\s[^#]+"
hi link requirementsComment Comment
hi link requirementsCommandOption Special