mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Add support for World of Warcraft .toc files
* Add language rule and heuristic for WoW Addon data * Add test fixtures for the .toc extension * Add grammar for syntax highlighting * Define colour of WoW .toc files * Refine heuristic to include a commonly-used keyword * Check whitespace in WoW-token heuristic * Include additional TeX keywords in .toc heuristic * Update grammar submodules * Cache license for WoW-toc grammar * Reverting sourcepawn update
This commit is contained in:
		
				
					committed by
					
						 Arfon Smith
						Arfon Smith
					
				
			
			
				
	
			
			
			
						parent
						
							8cf3b7ad51
						
					
				
				
					commit
					9ae19a1f94
				
			
							
								
								
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							| @@ -710,6 +710,9 @@ | |||||||
| [submodule "vendor/grammars/language-graphql"] | [submodule "vendor/grammars/language-graphql"] | ||||||
| 	path = vendor/grammars/language-graphql | 	path = vendor/grammars/language-graphql | ||||||
| 	url = https://github.com/rmosolgo/language-graphql | 	url = https://github.com/rmosolgo/language-graphql | ||||||
|  | [submodule "vendor/grammars/language-toc-wow"] | ||||||
|  | 	path = vendor/grammars/language-toc-wow | ||||||
|  | 	url = https://github.com/nebularg/language-toc-wow | ||||||
| [submodule "vendor/grammars/sublime-autoit"] | [submodule "vendor/grammars/sublime-autoit"] | ||||||
| 	path = vendor/grammars/sublime-autoit | 	path = vendor/grammars/sublime-autoit | ||||||
| 	url = https://github.com/AutoIt/SublimeAutoItScript | 	url = https://github.com/AutoIt/SublimeAutoItScript | ||||||
|   | |||||||
| @@ -124,7 +124,6 @@ vendor/grammars/SublimeBrainfuck: | |||||||
| vendor/grammars/SublimeClarion/: | vendor/grammars/SublimeClarion/: | ||||||
| - source.clarion | - source.clarion | ||||||
| vendor/grammars/SublimePapyrus/: | vendor/grammars/SublimePapyrus/: | ||||||
| - source.papyrus.fallout4 |  | ||||||
| - source.papyrus.skyrim | - source.papyrus.skyrim | ||||||
| vendor/grammars/SublimePuppet/: | vendor/grammars/SublimePuppet/: | ||||||
| - source.puppet | - source.puppet | ||||||
| @@ -372,6 +371,8 @@ vendor/grammars/language-shellscript: | |||||||
| - text.shell-session | - text.shell-session | ||||||
| vendor/grammars/language-supercollider: | vendor/grammars/language-supercollider: | ||||||
| - source.supercollider | - source.supercollider | ||||||
|  | vendor/grammars/language-toc-wow: | ||||||
|  | - source.toc | ||||||
| vendor/grammars/language-xbase: | vendor/grammars/language-xbase: | ||||||
| - source.harbour | - source.harbour | ||||||
| vendor/grammars/language-yaml: | vendor/grammars/language-yaml: | ||||||
|   | |||||||
| @@ -391,6 +391,14 @@ module Linguist | |||||||
|       end |       end | ||||||
|     end |     end | ||||||
|      |      | ||||||
|  |     disambiguate ".toc" do |data| | ||||||
|  |       if /^## |@no-lib-strip@/.match(data) | ||||||
|  |         Language["World of Warcraft Addon Data"] | ||||||
|  |       elsif /^\\(contentsline|defcounter|beamer|boolfalse)/.match(data) | ||||||
|  |         Language["TeX"] | ||||||
|  |       end | ||||||
|  |     end | ||||||
|  |  | ||||||
|     disambiguate ".ts" do |data| |     disambiguate ".ts" do |data| | ||||||
|       if data.include?("<TS ") |       if data.include?("<TS ") | ||||||
|         Language["XML"] |         Language["XML"] | ||||||
|   | |||||||
| @@ -3830,6 +3830,14 @@ WebIDL: | |||||||
|   tm_scope: source.webidl |   tm_scope: source.webidl | ||||||
|   ace_mode: text |   ace_mode: text | ||||||
|  |  | ||||||
|  | World of Warcraft Addon Data: | ||||||
|  |   type: data | ||||||
|  |   color: "#e0b330" | ||||||
|  |   extensions: | ||||||
|  |   - .toc | ||||||
|  |   tm_scope: source.toc | ||||||
|  |   ace_mode: text | ||||||
|  |  | ||||||
| X10: | X10: | ||||||
|   type: programming |   type: programming | ||||||
|   aliases: |   aliases: | ||||||
|   | |||||||
							
								
								
									
										9
									
								
								samples/TeX/beispiel.toc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								samples/TeX/beispiel.toc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | |||||||
|  | \beamer@endinputifotherversion {3.07pt} | ||||||
|  | \select@language {german} | ||||||
|  | \beamer@sectionintoc {1}{Geschichte}{3}{0}{1} | ||||||
|  | \beamer@sectionintoc {2}{Merkmale}{4}{0}{2} | ||||||
|  | \beamer@sectionintoc {3}{Kritikpunkte}{5}{0}{3} | ||||||
|  | \beamer@sectionintoc {4}{Perl-Kultur und Spa{\ss}}{6}{0}{4} | ||||||
|  | \beamer@sectionintoc {5}{Siehe auch}{7}{0}{5} | ||||||
|  | \beamer@sectionintoc {6}{Einzelnachweise}{8}{0}{6} | ||||||
|  | \beamer@sectionintoc {7}{Bedingte Ausf\"{u}hrung}{12}{0}{7} | ||||||
							
								
								
									
										19
									
								
								samples/TeX/perl.toc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								samples/TeX/perl.toc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | |||||||
|  | \contentsline {section}{\numberline {1}History}{3} | ||||||
|  | \contentsline {subsection}{\numberline {1.1}Early versions}{3} | ||||||
|  | \contentsline {subsection}{\numberline {1.2}Early Perl 5}{3} | ||||||
|  | \contentsline {subsection}{\numberline {1.3}2000-present}{3} | ||||||
|  | \contentsline {subsection}{\numberline {1.4}Name}{3} | ||||||
|  | \contentsline {subsection}{\numberline {1.5}Camel symbol}{3} | ||||||
|  | \contentsline {subsection}{\numberline {1.6}Onion symbol}{3} | ||||||
|  | \contentsline {section}{\numberline {2}Overview}{3} | ||||||
|  | \contentsline {subsection}{\numberline {2.1}Features}{3} | ||||||
|  | \contentsline {subsection}{\numberline {2.2}Design}{3} | ||||||
|  | \contentsline {subsection}{\numberline {2.3}Applications}{3} | ||||||
|  | \contentsline {subsection}{\numberline {2.4}Implementation}{3} | ||||||
|  | \contentsline {section}{\numberline {3}Database interfaces}{3} | ||||||
|  | \contentsline {section}{\numberline {4}Distribution}{4} | ||||||
|  | \contentsline {subsection}{\numberline {4.1}Availability}{4} | ||||||
|  | \contentsline {subsubsection}{\numberline {4.3.1}Windows}{5} | ||||||
|  | \contentsline {subsubsection}{\numberline {4.3.2}Mac OS X}{6} | ||||||
|  | \contentsline {subsubsection}{\numberline {4.3.3}OpenBSD}{6} | ||||||
|  | \contentsline {subsubsection}{\numberline {4.3.4}FreeBSD}{6} | ||||||
							
								
								
									
										6
									
								
								samples/World of Warcraft Addon Data/addon.toc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								samples/World of Warcraft Addon Data/addon.toc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | ## Interface: 60200 | ||||||
|  | ## Title: Vahevian Lotus Vane | ||||||
|  | ## Notes: "Critical Threat Range" | ||||||
|  | ## Version: 4.2 | ||||||
|  | Vahevia.xml | ||||||
|  | Lotus_Vane.lua | ||||||
							
								
								
									
										11
									
								
								samples/World of Warcraft Addon Data/lingua.toc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								samples/World of Warcraft Addon Data/lingua.toc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | |||||||
|  | # Internationalisation example | ||||||
|  |  | ||||||
|  | ## Title: Test | ||||||
|  | ## Title-esES: Pruebas | ||||||
|  | ## Title-huHU: Próba | ||||||
|  | ## Notes: "Testing this shit" | ||||||
|  | ## Notes-esES: "Probando la mierda esta" | ||||||
|  | ## Notes-huHU: "Kipróbálom ezt a szart" | ||||||
|  |  | ||||||
|  | Tests.xml | ||||||
|  | Elk.lua | ||||||
							
								
								
									
										24
									
								
								samples/World of Warcraft Addon Data/linguist.toc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								samples/World of Warcraft Addon Data/linguist.toc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | |||||||
|  | # Addon manifest file | ||||||
|  |  | ||||||
|  | ## Interface: 60200 | ||||||
|  | ## Title: Linguist | ||||||
|  | ## Notes: "Language savant" | ||||||
|  | ## RequiredDeps: charlockHolmes, escapeUtils, mimeTypes, rugged | ||||||
|  | ## LoadOnDemand: 1 | ||||||
|  | ## Version: 4.9 | ||||||
|  |  | ||||||
|  | # This is a comment | ||||||
|  | ## SavedVariables: foo, bar | ||||||
|  | ## SavedVariablesPerCharacter: fewburt | ||||||
|  |  | ||||||
|  | Languages.xml | ||||||
|  | Heuristics.xml | ||||||
|  | h-counter.lua | ||||||
|  | ruby-isnt.lua | ||||||
|  |  | ||||||
|  | # | ||||||
|  | # It is possible for addons to query values of any tags with a "X-" prefix. | ||||||
|  | # Some possibilities include: | ||||||
|  | # | ||||||
|  | ## X-Date: "2016-04-28" | ||||||
|  | ## X-Website: "https://github.com/" | ||||||
							
								
								
									
										2
									
								
								vendor/grammars/AutoHotkey
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/AutoHotkey
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/AutoHotkey updated: f66b9bb923...02fe2a8d3d
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/SublimePapyrus
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/SublimePapyrus
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/SublimePapyrus updated: 2d0b0b4cbf...5e90c66b30
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/language-babel
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/language-babel
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/language-babel updated: 58636d52f0...cde20a210f
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/language-javascript
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/language-javascript
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/language-javascript updated: 55af017874...5fb7053b45
									
								
							
							
								
								
									
										1
									
								
								vendor/grammars/language-toc-wow
									
									
									
									
										vendored
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/grammars/language-toc-wow
									
									
									
									
										vendored
									
									
										Submodule
									
								
							 Submodule vendor/grammars/language-toc-wow added at 6eb5eec4c0
									
								
							
							
								
								
									
										2
									
								
								vendor/grammars/vue-syntax-highlight
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								vendor/grammars/vue-syntax-highlight
									
									
									
									
										vendored
									
									
								
							 Submodule vendor/grammars/vue-syntax-highlight updated: 16b6051f20...b4c91d1b32
									
								
							
							
								
								
									
										25
									
								
								vendor/licenses/grammar/language-toc-wow.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								vendor/licenses/grammar/language-toc-wow.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | |||||||
|  | --- | ||||||
|  | type: grammar | ||||||
|  | name: language-toc-wow | ||||||
|  | license: mit | ||||||
|  | --- | ||||||
|  | Copyright (c) 2016 Kyle Buller | ||||||
|  |  | ||||||
|  | Permission is hereby granted, free of charge, to any person obtaining | ||||||
|  | a copy of this software and associated documentation files (the | ||||||
|  | "Software"), to deal in the Software without restriction, including | ||||||
|  | without limitation the rights to use, copy, modify, merge, publish, | ||||||
|  | distribute, sublicense, and/or sell copies of the Software, and to | ||||||
|  | permit persons to whom the Software is furnished to do so, subject to | ||||||
|  | the following conditions: | ||||||
|  |  | ||||||
|  | The above copyright notice and this permission notice shall be | ||||||
|  | included in all copies or substantial portions of the Software. | ||||||
|  |  | ||||||
|  | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||||
|  | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||||
|  | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||||
|  | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||||||
|  | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||||||
|  | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||||||
|  | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||||
		Reference in New Issue
	
	Block a user