Skip to content

Commit

Permalink
Fix partial matching of IP addresses and hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
Alhadis committed Dec 14, 2022
1 parent ffcc080 commit d03afee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grammars/hosts.cson
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ repository:
# Compressed form of IPv6's loopback address
loopback:
name: "constant.numeric.other.ip-address"
match: "(?<=\\s|^)(::)1"
match: "(?<=\\s|^)(::)1(?=$|\\s)"
captures:
1: name: "punctuation.definition.ip-address.loopback"

# Human-friendly hostname
host:
name: "entity.name.host.domain.hosts"
match: "[^:\\s#][^\\s#]*"
match: "(?<=\\s|^)[^:\\s#][^\\s#]*"
captures:
0: patterns: [include: "etc#dot"]

0 comments on commit d03afee

Please sign in to comment.