From 128abe353353a91cc0af01f68e8c244feb13ac80 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Tue, 20 Jun 2017 19:39:39 +1000 Subject: [PATCH] Fix spelling of Perl 6 (#3672) Resolves #3671. --- lib/linguist/heuristics.rb | 6 +++--- lib/linguist/languages.yml | 2 +- samples/{Perl6 => Perl 6}/01-dash-uppercase-i.t | 0 samples/{Perl6 => Perl 6}/01-parse.t | 0 samples/{Perl6 => Perl 6}/A.pm | 0 samples/{Perl6 => Perl 6}/ANSIColor.pm | 0 samples/{Perl6 => Perl 6}/Bailador.pm | 0 samples/{Perl6 => Perl 6}/ContainsUnicode.pm | 0 samples/{Perl6 => Perl 6}/Exception.pm | 0 samples/{Perl6 => Perl 6}/List.pm | 0 samples/{Perl6 => Perl 6}/Model.pm | 0 samples/{Perl6 => Perl 6}/RoleQ.pm6 | 0 samples/{Perl6 => Perl 6}/Simple.pm | 0 samples/{Perl6 => Perl 6}/Win32.pm | 0 samples/{Perl6 => Perl 6}/advent2009-day16.t | 0 samples/{Perl6 => Perl 6}/basic-open.t | 0 samples/{Perl6 => Perl 6}/calendar.t | 0 samples/{Perl6 => Perl 6}/for.t | 0 samples/{Perl6 => Perl 6}/grammar-test.p6 | 0 samples/{Perl6 => Perl 6}/hash.t | 0 samples/{Perl6 => Perl 6}/htmlify.pl | 0 samples/{Perl6 => Perl 6}/listquote-whitespace.t | 0 samples/{Perl6 => Perl 6}/man-or-boy.t | 0 samples/{Perl6 => Perl 6}/test.p6 | 0 test/test_heuristics.rb | 16 ++++++++-------- vendor/README.md | 2 +- 26 files changed, 13 insertions(+), 13 deletions(-) rename samples/{Perl6 => Perl 6}/01-dash-uppercase-i.t (100%) rename samples/{Perl6 => Perl 6}/01-parse.t (100%) rename samples/{Perl6 => Perl 6}/A.pm (100%) rename samples/{Perl6 => Perl 6}/ANSIColor.pm (100%) rename samples/{Perl6 => Perl 6}/Bailador.pm (100%) rename samples/{Perl6 => Perl 6}/ContainsUnicode.pm (100%) rename samples/{Perl6 => Perl 6}/Exception.pm (100%) rename samples/{Perl6 => Perl 6}/List.pm (100%) rename samples/{Perl6 => Perl 6}/Model.pm (100%) rename samples/{Perl6 => Perl 6}/RoleQ.pm6 (100%) rename samples/{Perl6 => Perl 6}/Simple.pm (100%) rename samples/{Perl6 => Perl 6}/Win32.pm (100%) rename samples/{Perl6 => Perl 6}/advent2009-day16.t (100%) rename samples/{Perl6 => Perl 6}/basic-open.t (100%) rename samples/{Perl6 => Perl 6}/calendar.t (100%) rename samples/{Perl6 => Perl 6}/for.t (100%) rename samples/{Perl6 => Perl 6}/grammar-test.p6 (100%) rename samples/{Perl6 => Perl 6}/hash.t (100%) rename samples/{Perl6 => Perl 6}/htmlify.pl (100%) rename samples/{Perl6 => Perl 6}/listquote-whitespace.t (100%) rename samples/{Perl6 => Perl 6}/man-or-boy.t (100%) rename samples/{Perl6 => Perl 6}/test.p6 (100%) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 70fc2787..5349bdd9 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -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 diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index c84dfe6c..0e7a2bec 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3210,7 +3210,7 @@ Perl: interpreters: - perl language_id: 282 -Perl6: +Perl 6: type: programming color: "#0000fb" extensions: diff --git a/samples/Perl6/01-dash-uppercase-i.t b/samples/Perl 6/01-dash-uppercase-i.t similarity index 100% rename from samples/Perl6/01-dash-uppercase-i.t rename to samples/Perl 6/01-dash-uppercase-i.t diff --git a/samples/Perl6/01-parse.t b/samples/Perl 6/01-parse.t similarity index 100% rename from samples/Perl6/01-parse.t rename to samples/Perl 6/01-parse.t diff --git a/samples/Perl6/A.pm b/samples/Perl 6/A.pm similarity index 100% rename from samples/Perl6/A.pm rename to samples/Perl 6/A.pm diff --git a/samples/Perl6/ANSIColor.pm b/samples/Perl 6/ANSIColor.pm similarity index 100% rename from samples/Perl6/ANSIColor.pm rename to samples/Perl 6/ANSIColor.pm diff --git a/samples/Perl6/Bailador.pm b/samples/Perl 6/Bailador.pm similarity index 100% rename from samples/Perl6/Bailador.pm rename to samples/Perl 6/Bailador.pm diff --git a/samples/Perl6/ContainsUnicode.pm b/samples/Perl 6/ContainsUnicode.pm similarity index 100% rename from samples/Perl6/ContainsUnicode.pm rename to samples/Perl 6/ContainsUnicode.pm diff --git a/samples/Perl6/Exception.pm b/samples/Perl 6/Exception.pm similarity index 100% rename from samples/Perl6/Exception.pm rename to samples/Perl 6/Exception.pm diff --git a/samples/Perl6/List.pm b/samples/Perl 6/List.pm similarity index 100% rename from samples/Perl6/List.pm rename to samples/Perl 6/List.pm diff --git a/samples/Perl6/Model.pm b/samples/Perl 6/Model.pm similarity index 100% rename from samples/Perl6/Model.pm rename to samples/Perl 6/Model.pm diff --git a/samples/Perl6/RoleQ.pm6 b/samples/Perl 6/RoleQ.pm6 similarity index 100% rename from samples/Perl6/RoleQ.pm6 rename to samples/Perl 6/RoleQ.pm6 diff --git a/samples/Perl6/Simple.pm b/samples/Perl 6/Simple.pm similarity index 100% rename from samples/Perl6/Simple.pm rename to samples/Perl 6/Simple.pm diff --git a/samples/Perl6/Win32.pm b/samples/Perl 6/Win32.pm similarity index 100% rename from samples/Perl6/Win32.pm rename to samples/Perl 6/Win32.pm diff --git a/samples/Perl6/advent2009-day16.t b/samples/Perl 6/advent2009-day16.t similarity index 100% rename from samples/Perl6/advent2009-day16.t rename to samples/Perl 6/advent2009-day16.t diff --git a/samples/Perl6/basic-open.t b/samples/Perl 6/basic-open.t similarity index 100% rename from samples/Perl6/basic-open.t rename to samples/Perl 6/basic-open.t diff --git a/samples/Perl6/calendar.t b/samples/Perl 6/calendar.t similarity index 100% rename from samples/Perl6/calendar.t rename to samples/Perl 6/calendar.t diff --git a/samples/Perl6/for.t b/samples/Perl 6/for.t similarity index 100% rename from samples/Perl6/for.t rename to samples/Perl 6/for.t diff --git a/samples/Perl6/grammar-test.p6 b/samples/Perl 6/grammar-test.p6 similarity index 100% rename from samples/Perl6/grammar-test.p6 rename to samples/Perl 6/grammar-test.p6 diff --git a/samples/Perl6/hash.t b/samples/Perl 6/hash.t similarity index 100% rename from samples/Perl6/hash.t rename to samples/Perl 6/hash.t diff --git a/samples/Perl6/htmlify.pl b/samples/Perl 6/htmlify.pl similarity index 100% rename from samples/Perl6/htmlify.pl rename to samples/Perl 6/htmlify.pl diff --git a/samples/Perl6/listquote-whitespace.t b/samples/Perl 6/listquote-whitespace.t similarity index 100% rename from samples/Perl6/listquote-whitespace.t rename to samples/Perl 6/listquote-whitespace.t diff --git a/samples/Perl6/man-or-boy.t b/samples/Perl 6/man-or-boy.t similarity index 100% rename from samples/Perl6/man-or-boy.t rename to samples/Perl 6/man-or-boy.t diff --git a/samples/Perl6/test.p6 b/samples/Perl 6/test.p6 similarity index 100% rename from samples/Perl6/test.p6 rename to samples/Perl 6/test.p6 diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index 712e5093..36cedf0d 100644 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -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 diff --git a/vendor/README.md b/vendor/README.md index 94638ec2..87f33e8a 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -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)