From 5e9bb67d10f0670ba1278c130fe66d44b682b90b Mon Sep 17 00:00:00 2001 From: David Pyke Le Brun Date: Mon, 9 Feb 2015 14:27:14 +0000 Subject: [PATCH] temporary add grammer to whitelist until license gets added --- lib/linguist/heuristics.rb | 2 +- test/test_grammars.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 85b013eb..a4d31626 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -226,7 +226,7 @@ module Linguist disambiguate "PLSQL", "SQLPL", "PLpgSQL", "SQL" do |data| #only return value if a definite positive - if /^\\i\b|AS \$\$|LANGUAGE '+plpgsql'+/i.match(data) || /SECURITY (DEFINER|INVOKER)/i.match(data) || /BEGIN (WORK|TRANSACTION)+;/i.match(data) + if /^\\i\b|AS \$\$|LANGUAGE '+plpgsql'+/i.match(data) || /SECURITY (DEFINER|INVOKER)/i.match(data) || /BEGIN( WORK| TRANSACTION)?;/i.match(data) #postgres Language["PLpgSQL"] elsif /(alter module)|(language sql)|(begin( NOT)+ atomic)/i.match(data) || /signal SQLSTATE '[0-9]+'/i.match(data) diff --git a/test/test_grammars.rb b/test/test_grammars.rb index 188bc187..48f6d83c 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -9,6 +9,7 @@ class TestGrammars < Minitest::Test vendor/grammars/Sublime-Lasso vendor/grammars/Sublime-REBOL vendor/grammars/x86-assembly-textmate-bundle + vendor/grammars/oracle.tmbundle ].freeze def setup