mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	| @@ -340,13 +340,13 @@ module Linguist | ||||
|       elsif /use strict|use\s+v?5\./.match(data) | ||||
|         Language["Perl"] | ||||
|       elsif /^(use v6|(my )?class|module)/.match(data) | ||||
|         Language["Perl6"] | ||||
|         Language["Perl 6"] | ||||
|       end | ||||
|     end | ||||
|  | ||||
|     disambiguate ".pm" do |data| | ||||
|       if /^\s*(?:use\s+v6\s*;|(?:\bmy\s+)?class|module)\b/.match(data) | ||||
|         Language["Perl6"] | ||||
|         Language["Perl 6"] | ||||
|       elsif /\buse\s+(?:strict\b|v?5\.)/.match(data) | ||||
|         Language["Perl"] | ||||
|       end | ||||
| @@ -446,7 +446,7 @@ module Linguist | ||||
|       if /^\s*%[ \t]+|^\s*var\s+\w+\s*:=\s*\w+/.match(data) | ||||
|         Language["Turing"] | ||||
|       elsif /^\s*(?:use\s+v6\s*;|\bmodule\b|\b(?:my\s+)?class\b)/.match(data) | ||||
|         Language["Perl6"] | ||||
|         Language["Perl 6"] | ||||
|       elsif /\buse\s+(?:strict\b|v?5\.)/.match(data) | ||||
|         Language["Perl"] | ||||
|       end | ||||
|   | ||||
| @@ -3210,7 +3210,7 @@ Perl: | ||||
|   interpreters: | ||||
|   - perl | ||||
|   language_id: 282 | ||||
| Perl6: | ||||
| Perl 6: | ||||
|   type: programming | ||||
|   color: "#0000fb" | ||||
|   extensions: | ||||
|   | ||||
| @@ -212,20 +212,20 @@ class TestHeuristcs < Minitest::Test | ||||
|     }) | ||||
|   end | ||||
|  | ||||
|   # Candidate languages = ["Perl", "Perl6", "Prolog"] | ||||
|   # Candidate languages = ["Perl", "Perl 6", "Prolog"] | ||||
|   def test_pl_prolog_perl_by_heuristics | ||||
|     assert_heuristics({ | ||||
|       "Prolog" => all_fixtures("Prolog", "*.pl"), | ||||
|       "Perl" => ["Perl/oo1.pl", "Perl/oo2.pl", "Perl/oo3.pl", "Perl/fib.pl", "Perl/use5.pl"], | ||||
|       "Perl6" => all_fixtures("Perl6", "*.pl") | ||||
|       "Perl 6" => all_fixtures("Perl 6", "*.pl") | ||||
|     }) | ||||
|   end | ||||
|  | ||||
|   # Candidate languages = ["Perl", "Perl6"] | ||||
|   # Candidate languages = ["Perl", "Perl 6"] | ||||
|   def test_pm_perl_by_heuristics | ||||
|     assert_heuristics({ | ||||
|       "Perl" => all_fixtures("Perl", "*.pm"), | ||||
|       "Perl6" => all_fixtures("Perl6", "*.pm") | ||||
|       "Perl 6" => all_fixtures("Perl 6", "*.pm") | ||||
|     }) | ||||
|   end | ||||
|  | ||||
| @@ -279,13 +279,13 @@ class TestHeuristcs < Minitest::Test | ||||
|     }) | ||||
|   end | ||||
|  | ||||
|   # Candidate languages = ["Perl", "Perl6"] | ||||
|   # Candidate languages = ["Perl", "Perl 6"] | ||||
|   def test_t_perl_by_heuristics | ||||
|     assert_heuristics({ | ||||
|       "Perl" => all_fixtures("Perl", "*.t"), | ||||
|       "Perl6" => ["Perl6/01-dash-uppercase-i.t", "Perl6/01-parse.t", "Perl6/advent2009-day16.t", | ||||
|                   "Perl6/basic-open.t", "Perl6/calendar.t", "Perl6/for.t", "Perl6/hash.t", | ||||
|                   "Perl6/listquote-whitespace.t"] | ||||
|       "Perl 6" => ["Perl 6/01-dash-uppercase-i.t", "Perl 6/01-parse.t", "Perl 6/advent2009-day16.t", | ||||
|                    "Perl 6/basic-open.t", "Perl 6/calendar.t", "Perl 6/for.t", "Perl 6/hash.t", | ||||
|                    "Perl 6/listquote-whitespace.t"] | ||||
|     }) | ||||
|   end | ||||
|  | ||||
|   | ||||
							
								
								
									
										2
									
								
								vendor/README.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/README.md
									
									
									
									
										vendored
									
									
								
							| @@ -255,7 +255,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting | ||||
| - **PAWN:** [Southclaw/pawn-sublime-language](https://github.com/Southclaw/pawn-sublime-language) | ||||
| - **Pep8:** [R4PaSs/Sublime-Pep8](https://github.com/R4PaSs/Sublime-Pep8) | ||||
| - **Perl:** [textmate/perl.tmbundle](https://github.com/textmate/perl.tmbundle) | ||||
| - **Perl6:** [perl6/atom-language-perl6](https://github.com/perl6/atom-language-perl6) | ||||
| - **Perl 6:** [perl6/atom-language-perl6](https://github.com/perl6/atom-language-perl6) | ||||
| - **PHP:** [textmate/php.tmbundle](https://github.com/textmate/php.tmbundle) | ||||
| - **Pic:** [Alhadis/language-roff](https://github.com/Alhadis/language-roff) | ||||
| - **PicoLisp:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user