github-linguist 9.4.0 → 9.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/grammars/etc.json +1 -1
- data/grammars/markdown.mojo.codeblock.json +1 -0
- data/grammars/markdown.move.codeblock.json +1 -1
- data/grammars/source.4dm.json +1 -1
- data/grammars/source.abl.json +1 -1
- data/grammars/source.apex.json +1 -1
- data/grammars/source.astro.json +1 -1
- data/grammars/source.baml-jinja.json +1 -0
- data/grammars/source.baml.json +1 -0
- data/grammars/source.bb.json +1 -1
- data/grammars/source.brs.embedded.xml.json +1 -0
- data/grammars/source.bsl.json +1 -1
- data/grammars/source.c++.json +1 -1
- data/grammars/source.c.json +1 -1
- data/grammars/source.c3.json +1 -1
- data/grammars/source.cel.json +1 -0
- data/grammars/source.clarion.json +1 -1
- data/grammars/source.cmake.json +1 -1
- data/grammars/source.cmakecache.json +1 -1
- data/grammars/source.cpan-mirror.json +1 -0
- data/grammars/source.cpan-skiplist.json +1 -0
- data/grammars/source.cs.json +1 -1
- data/grammars/source.csv.json +1 -1
- data/grammars/source.curlrc.json +1 -1
- data/grammars/source.dart.json +1 -1
- data/grammars/source.daslang.json +1 -1
- data/grammars/source.data-weave.json +1 -1
- data/grammars/source.emacs.lisp.json +1 -1
- data/grammars/source.firrtl.json +1 -1
- data/grammars/source.flatbuffers.json +1 -0
- data/grammars/source.gdscript.json +1 -1
- data/grammars/source.gimprc.json +1 -0
- data/grammars/source.gimpres.json +1 -0
- data/grammars/source.graphql.json +1 -1
- data/grammars/source.gtkrc.json +1 -0
- data/grammars/source.hack.json +1 -1
- data/grammars/source.hosts.json +1 -1
- data/grammars/source.il.json +1 -0
- data/grammars/source.ilecobol.json +1 -1
- data/grammars/source.ink.json +1 -1
- data/grammars/source.interp.json +1 -0
- data/grammars/source.jac.json +1 -1
- data/grammars/source.jactoml.json +1 -0
- data/grammars/source.jai.json +1 -1
- data/grammars/source.julia.json +1 -1
- data/grammars/source.just.json +1 -1
- data/grammars/source.lean4.markdown.json +1 -1
- data/grammars/source.liquidsoap.json +1 -0
- data/grammars/source.llvm.json +1 -1
- data/grammars/source.luau.json +1 -1
- data/grammars/source.m2.json +1 -1
- data/grammars/source.m3u.json +1 -1
- data/grammars/source.matlab.json +1 -1
- data/grammars/source.mc.json +1 -1
- data/grammars/source.mdx.astro.json +1 -1
- data/grammars/source.mermaid.json +1 -1
- data/grammars/source.metta.json +1 -0
- data/grammars/source.mo.json +1 -1
- data/grammars/source.mojo.json +1 -1
- data/grammars/source.moonbit.config.json +1 -0
- data/grammars/source.moonbit.json +1 -1
- data/grammars/source.move.json +1 -1
- data/grammars/source.opy.json +1 -0
- data/grammars/source.pic.json +1 -1
- data/grammars/source.pkgconf.json +1 -0
- data/grammars/source.powerquery.json +1 -0
- data/grammars/source.powershell.json +1 -1
- data/grammars/source.prisma.json +1 -1
- data/grammars/source.quint.json +1 -0
- data/grammars/source.rascal.json +1 -1
- data/grammars/source.rascript.json +1 -1
- data/grammars/source.record-jar.json +1 -1
- data/grammars/source.redscript.json +1 -0
- data/grammars/source.rego.json +1 -1
- data/grammars/source.ron.json +1 -1
- data/grammars/source.rpgle.json +1 -1
- data/grammars/source.slang.json +1 -1
- data/grammars/source.slint.json +1 -1
- data/grammars/source.soql.json +1 -1
- data/grammars/source.spicedb-yaml.json +1 -0
- data/grammars/source.spicedb.json +1 -0
- data/grammars/source.stan.json +1 -1
- data/grammars/source.surrealql.json +1 -1
- data/grammars/source.swift.json +1 -1
- data/grammars/source.tsp.json +1 -1
- data/grammars/source.uri-list.json +1 -0
- data/grammars/source.v.json +1 -1
- data/grammars/source.vento.json +1 -1
- data/grammars/source.wgsl.json +1 -1
- data/grammars/spicedb-yaml.injection.json +1 -0
- data/grammars/text.cachedir.json +1 -0
- data/grammars/text.cookie-jar.json +1 -0
- data/grammars/text.html.vue.json +1 -1
- data/grammars/text.mac-tts.json +1 -0
- data/grammars/text.roff.json +1 -1
- data/grammars/text.srt.json +1 -1
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/classifier.rb +2 -1
- data/lib/linguist/generated.rb +16 -0
- data/lib/linguist/generic.yml +2 -0
- data/lib/linguist/heuristics.yml +17 -0
- data/lib/linguist/language.rb +8 -0
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +173 -12
- data/lib/linguist/lazy_blob.rb +19 -1
- data/lib/linguist/samples.json +1 -1
- data/lib/linguist/source/rugged.rb +16 -1
- data/lib/linguist/vendor.yml +3 -0
- metadata +30 -3
- data/grammars/source.vscode.c3.json +0 -1
- data/grammars/text.html.vento.json +0 -1
data/grammars/text.srt.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"SubRip Text","scopeName":"text.srt","patterns":[{"include":"#main"}],"repository":{"action":{"patterns":[{"name":"string.quoted.other.sound.action.square-brackets.srt","begin":"\\[","end":"\\]|(?=^[ \\t]*$)","patterns":[{"include":"#formatting"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.srt"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.srt"}}},{"name":"string.quoted.other.sound.action.round-brackets.srt","begin":"\\(","end":"\\)|(?=^[ \\t]*$)","patterns":[{"include":"#formatting"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.srt"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.srt"}}}]},"align":{"name":"meta.tag.override.line-alignment.srt","match":"({)(\\\\a(?:n[1-9]|(10|11|(?!4|8)\\d)))(})","captures":{"1":{"name":"punctuation.definition.tag.begin.srt"},"2":{"name":"entity.name.tag.srt"},"3":{"name":"invalid.deprecated.syntax.tag.srt"},"4":{"name":"punctuation.definition.tag.end.srt"}}},"arrow":{"name":"keyword.operator.timespan.srt","match":"--\u003e","captures":{"0":{"name":"punctuation.definition.separator.srt"}}},"bold":{"contentName":"markup.bold.srt","begin":"(\u003c)([Bb])(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(\u003c/)([Bb])[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.b.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.b.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.b.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.b.html"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"dash":{"name":"markup.quote.quotation-dash.srt","match":"(?:^|\\G)(-)","captures":{"1":{"name":"punctuation.section.quote.srt"}}},"escapes":{"patterns":[{"name":"constant.character.whitespace.escape.hard-space.srt","match":"(\\\\)h","captures":{"1":{"name":"punctuation.definition.escape.backslash.srt"}}},{"name":"constant.character.whitespace.escape.forced-newline.srt","match":"(\\\\)N","captures":{"1":{"name":"punctuation.definition.escape.backslash.srt"}}}]},"font":{"contentName":"markup.other.font.srt","begin":"(?i)(\u003c)(font)(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(?i)(\u003c/)(font)[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.font.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.font.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.font.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.font.html.srt"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"formatting":{"patterns":[{"include":"#bold"},{"include":"#italic"},{"include":"#underline"},{"include":"#strike"},{"include":"#font"},{"include":"#
|
|
1
|
+
{"name":"SubRip Text","scopeName":"text.srt","patterns":[{"include":"#main"}],"repository":{"action":{"patterns":[{"name":"string.quoted.other.sound.action.square-brackets.srt","begin":"\\[","end":"\\]|(?=^[ \\t]*$)","patterns":[{"include":"#formatting"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.srt"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.srt"}}},{"name":"string.quoted.other.sound.action.round-brackets.srt","begin":"\\(","end":"\\)|(?=^[ \\t]*$)","patterns":[{"include":"#formatting"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.srt"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.srt"}}}]},"align":{"name":"meta.tag.override.line-alignment.srt","match":"({)(\\\\a(?:n[1-9]|(10|11|(?!4|8)\\d)))(})","captures":{"1":{"name":"punctuation.definition.tag.begin.srt"},"2":{"name":"entity.name.tag.srt"},"3":{"name":"invalid.deprecated.syntax.tag.srt"},"4":{"name":"punctuation.definition.tag.end.srt"}}},"arrow":{"name":"keyword.operator.timespan.srt","match":"--\u003e","captures":{"0":{"name":"punctuation.definition.separator.srt"}}},"bold":{"contentName":"markup.bold.srt","begin":"(\u003c)([Bb])(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(\u003c/)([Bb])[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.b.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.b.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.b.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.b.html"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"dash":{"patterns":[{"name":"markup.quote.quotation-dash.srt","match":"(?:^|\\G)(-)","captures":{"1":{"name":"punctuation.section.quote.srt"}}},{"match":"(?:^|\\G)((?:{(?:.:|\\\\)[^}]*})++)(-)","captures":{"1":{"patterns":[{"include":"#ssa"}]},"2":{"patterns":[{"include":"#dash"}]}}}]},"escapes":{"patterns":[{"name":"constant.character.whitespace.escape.hard-space.srt","match":"(\\\\)h","captures":{"1":{"name":"punctuation.definition.escape.backslash.srt"}}},{"name":"constant.character.whitespace.escape.forced-newline.srt","match":"(\\\\)N","captures":{"1":{"name":"punctuation.definition.escape.backslash.srt"}}}]},"font":{"contentName":"markup.other.font.srt","begin":"(?i)(\u003c)(font)(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(?i)(\u003c/)(font)[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.font.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.font.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.font.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.font.html.srt"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"formatting":{"patterns":[{"include":"#bold"},{"include":"#italic"},{"include":"#underline"},{"include":"#strike"},{"include":"#font"},{"include":"#ssa"}]},"italic":{"contentName":"markup.italic.srt","begin":"(\u003c)([Ii])(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(\u003c/)([Ii])[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.i.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.i.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.i.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.i.html"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"linePosition":{"name":"meta.line-position.${2:/downcase}-axis.srt","match":"\\b(([XY])[0-9]+)(:)(?:([-+]?[0-9]+\\.[0-9]+)|([-+]?[0-9]+))\\b","captures":{"1":{"name":"variable.parameter.position.srt"},"3":{"name":"keyword.operator.assignment.key-value.colon.srt"},"4":{"name":"constant.numeric.float.srt"},"5":{"name":"constant.numeric.integer.srt"}}},"lyrics":{"name":"markup.quote.lyrics.srt","begin":"(♪+)[ \\t]*","end":"[ \\t]*(♪+)|(?=^-|^[ \\t]*$|\\s*\u003c/)","patterns":[{"include":"#formatting"}],"beginCaptures":{"1":{"name":"punctuation.definition.lyrics.begin.srt"}},"endCaptures":{"1":{"name":"punctuation.definition.lyrics.end.srt"}}},"main":{"patterns":[{"include":"#subtitle"}]},"speaker":{"match":"(?x)\n(?:^|\\G)\n((?:{(?:.:|\\\\)[^}]*})*+)\n(-(?:\\\\h|[ \\t])*)?\n(\n\t(?: [^-\u003c\u003e\\s:] [^\u003c\u003e:]* (?=:[ \\t]*\\S)\n\t| [^-\u003c\u003e\\s:a-z] [^\u003c\u003e:a-z]*\n\t| \u003c(?!/(?i:[bisu]|font)\u003e\\s*:)\n\t)++\n\t(?:\n\t\t(?=(?:\\s*\u003c/(?i:[bisu]|font)\u003e)++\\s*:)\n\t\t|\n\t\t(:)\n\t)\n)(?=$|\\s|\u003c/)","captures":{"1":{"patterns":[{"include":"#ssa"}]},"2":{"patterns":[{"include":"#dash"},{"include":"#escapes"}]},"3":{"name":"entity.name.speaker.srt","patterns":[{"include":"#formatting"},{"include":"#action"}]},"4":{"name":"punctuation.separator.speaker.colon.srt"}}},"ssa":{"patterns":[{"include":"#align"},{"include":"#unknownTag"}]},"strike":{"contentName":"markup.strike.srt","begin":"(\u003c)([Ss])(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(\u003c/)([Ss])[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.s.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.s.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.s.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.s.html"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"subtitle":{"name":"meta.subtitle.srt","begin":"^(?:?)(\\d+)$","end":"^[ \\t]*$","patterns":[{"begin":"\\G\\s*","end":"(?!\\G)$","patterns":[{"name":"meta.timespan.empty.srt","contentName":"comment.block.ignored.hidden-subtitle.srt","begin":"(?x) ^\n([0-9]{2}:[0-9]{2}:[0-9]{2}[,.][0-9]{3}) \\x20(--\u003e)\\x20 (\\1)\n((?:\\s*[XY][0-9]+:[-+]?[0-9]+(?:\\.[0-9]+)?)++)?\n[ \\t]* $ ","end":"(?=^[ \\t]*$)","beginCaptures":{"1":{"name":"constant.numeric.time.timecode.start.srt","patterns":[{"include":"#timecode"}]},"2":{"patterns":[{"include":"#arrow"}]},"3":{"name":"constant.numeric.time.timecode.end.srt","patterns":[{"include":"#timecode"}]},"4":{"patterns":[{"include":"#linePosition"}]}}},{"name":"meta.timespan.srt","match":"(?x) ^\n([0-9]{2}:[0-9]{2}:[0-9]{2}[,.][0-9]{3}) \\x20(--\u003e)\\x20\n([0-9]{2}:[0-9]{2}:[0-9]{2}[,.][0-9]{3})\n((?:\\s*[XY][0-9]+:[-+]?[0-9]+(?:\\.[0-9]+)?)++)?\n[ \\t]* $ ","captures":{"1":{"name":"constant.numeric.time.timecode.start.srt","patterns":[{"include":"#timecode"}]},"2":{"patterns":[{"include":"#arrow"}]},"3":{"name":"constant.numeric.time.timecode.end.srt","patterns":[{"include":"#timecode"}]},"4":{"patterns":[{"include":"#linePosition"}]}}},{"include":"#text"}]},{"include":"#text"}],"beginCaptures":{"1":{"name":"entity.name.section.srt"}}},"text":{"patterns":[{"include":"#speaker"},{"include":"#dash"},{"include":"#action"},{"include":"#lyrics"},{"include":"#formatting"},{"include":"#escapes"}]},"timecode":{"patterns":[{"name":"invalid.illegal.syntax.decimal-separator.srt","match":"\\."},{"name":"invalid.illegal.value.out-of-range.vtt","match":"(?\u003c=:)([6-9][0-9])"}]},"underline":{"contentName":"markup.underline.srt","begin":"(\u003c)([Uu])(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(\u003c/)([Uu])[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.u.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.u.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.u.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.u.html"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"unknownTag":{"name":"meta.tag.override.unsupported.srt","match":"({)(?:.:|\\\\)[^}]*(})","captures":{"0":{"name":"invalid.unimplemented.syntax.tag.srt"},"1":{"name":"punctuation.definition.tag.begin.srt"},"2":{"name":"punctuation.definition.tag.end.srt"}}}}}
|
data/grammars/version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
9.
|
|
1
|
+
9.6.0
|
data/lib/linguist/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
9.
|
|
1
|
+
9.6.0
|
data/lib/linguist/classifier.rb
CHANGED
|
@@ -136,7 +136,8 @@ module Linguist
|
|
|
136
136
|
|
|
137
137
|
scores = {}
|
|
138
138
|
languages.each do |language|
|
|
139
|
-
|
|
139
|
+
fs_name = Language.find_by_name(language).fs_name
|
|
140
|
+
centroid = @centroids[fs_name || language]
|
|
140
141
|
score = Classifier.similarity(vec, centroid)
|
|
141
142
|
if score > 0.0
|
|
142
143
|
scores[language] = score
|
data/lib/linguist/generated.rb
CHANGED
|
@@ -92,6 +92,8 @@ module Linguist
|
|
|
92
92
|
pipenv_lock? ||
|
|
93
93
|
gradle_wrapper? ||
|
|
94
94
|
maven_wrapper? ||
|
|
95
|
+
mise_lock? ||
|
|
96
|
+
julia_manifest? ||
|
|
95
97
|
generated_go? ||
|
|
96
98
|
generated_protocol_buffer_from_go? ||
|
|
97
99
|
generated_protocol_buffer? ||
|
|
@@ -582,6 +584,20 @@ module Linguist
|
|
|
582
584
|
!!name.match(/(?:^|\/)mvnw(?:\.cmd)?$/i)
|
|
583
585
|
end
|
|
584
586
|
|
|
587
|
+
# Internal: Is the blob a mise-en-place lock file?
|
|
588
|
+
#
|
|
589
|
+
# Returns true or false.
|
|
590
|
+
def mise_lock?
|
|
591
|
+
!!name.match(/(?:^|\/)mise(?:\.[^\/]+)?\.lock$/)
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
# Internal: Is the blob a Julia Manifest.toml file?
|
|
595
|
+
#
|
|
596
|
+
# Returns true or false.
|
|
597
|
+
def julia_manifest?
|
|
598
|
+
!!name.match(/(?:^|\/)(Julia)?Manifest(-v\d+\.\d+)?\.toml$/)
|
|
599
|
+
end
|
|
600
|
+
|
|
585
601
|
# Is the blob a VCR Cassette file?
|
|
586
602
|
#
|
|
587
603
|
# Returns true or false
|
data/lib/linguist/generic.yml
CHANGED
data/lib/linguist/heuristics.yml
CHANGED
|
@@ -209,6 +209,14 @@ disambiguations:
|
|
|
209
209
|
rules:
|
|
210
210
|
- language: Gerber Image
|
|
211
211
|
pattern: '^[DGMT][0-9]{2}\*(?:\r?\n|\r)'
|
|
212
|
+
- extensions: ['.container', '.mount', '.network', '.service', '.socket', '.target', '.timer']
|
|
213
|
+
rules:
|
|
214
|
+
- language: INI
|
|
215
|
+
and:
|
|
216
|
+
# e.g., "[foobar]" or "# [commented out]"
|
|
217
|
+
- pattern: '^[#\s]*\[[^\]]+\]\s*$'
|
|
218
|
+
- named_pattern: key_equals_value
|
|
219
|
+
- negative_pattern: '^[^#;=\[]+[^ \r\n=]$'
|
|
212
220
|
- extensions: ['.cs']
|
|
213
221
|
rules:
|
|
214
222
|
- language: Smalltalk
|
|
@@ -637,6 +645,15 @@ disambiguations:
|
|
|
637
645
|
pattern:
|
|
638
646
|
- '(?i)\bDEFINE\s+(?:VARIABLE|TEMP-TABLE|BUFFER|QUERY|INPUT\s+PARAMETER|OUTPUT\s+PARAMETER)\b'
|
|
639
647
|
- '(?i)\bEND(?:\s+(?:PROCEDURE|FUNCTION|DO|FOR\s+EACH))?\.'
|
|
648
|
+
- extensions: ['.pc']
|
|
649
|
+
rules:
|
|
650
|
+
- language: Pro*C
|
|
651
|
+
pattern: '^\s*EXEC\s+SQL\s'
|
|
652
|
+
- language: pkg-config
|
|
653
|
+
and:
|
|
654
|
+
- pattern: '^Name:[ \t]+\S'
|
|
655
|
+
- pattern: '^Description:[ \t]+\S'
|
|
656
|
+
- pattern: '^Version:[ \t]+\S'
|
|
640
657
|
- extensions: ['.php']
|
|
641
658
|
rules:
|
|
642
659
|
- language: Hack
|
data/lib/linguist/language.rb
CHANGED
|
@@ -60,6 +60,14 @@ module Linguist
|
|
|
60
60
|
# Language name index
|
|
61
61
|
@index[language.name.downcase] = @name_index[language.name.downcase] = language
|
|
62
62
|
|
|
63
|
+
# Index filesystem name if defined
|
|
64
|
+
if language.fs_name
|
|
65
|
+
if @name_index.key?(language.fs_name)
|
|
66
|
+
raise ArgumentError "Duplicate language name: #{language.fs_name}"
|
|
67
|
+
end
|
|
68
|
+
@index[language.fs_name.downcase] = @name_index[language.fs_name.downcase] = language
|
|
69
|
+
end
|
|
70
|
+
|
|
63
71
|
language.aliases.each do |name|
|
|
64
72
|
# All Language aliases should be unique. Raise if there is a duplicate.
|
|
65
73
|
if @alias_index.key?(name)
|