Merge pull request #2346 from larsbrinkhoff/public-key

Add support for SSH2 and OpenSSH public keys
This commit is contained in:
Arfon Smith
2015-04-21 08:22:05 -05:00
6 changed files with 16 additions and 4 deletions

View File

@@ -155,12 +155,12 @@ module Linguist
end
disambiguate "AsciiDoc", "AGS Script", "Public Key" do |data|
if /^[=-]+(\s|\n)|{{[A-Za-z]/.match(data)
if /^(----[- ]BEGIN|ssh-(rsa|dss)) /.match(data)
Language["Public Key"]
elsif /^[=-]+(\s|\n)|{{[A-Za-z]/.match(data)
Language["AsciiDoc"]
elsif /^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])/.match(data)
Language["AGS Script"]
elsif /^-----BEGIN/.match(data)
Language["Public Key"]
end
end