mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Adds supports for Slim
This commit is contained in:
		| @@ -2002,6 +2002,13 @@ Slash: | |||||||
|   extensions: |   extensions: | ||||||
|   - .sl |   - .sl | ||||||
|  |  | ||||||
|  | Slim: | ||||||
|  |   group: HTML | ||||||
|  |   type: markup | ||||||
|  |   color: "#ff8877" | ||||||
|  |   extensions: | ||||||
|  |   - .slim | ||||||
|  |  | ||||||
| Smalltalk: | Smalltalk: | ||||||
|   type: programming |   type: programming | ||||||
|   color: "#596706" |   color: "#596706" | ||||||
|   | |||||||
| @@ -549,6 +549,9 @@ | |||||||
|     "Slash": [ |     "Slash": [ | ||||||
|       ".sl" |       ".sl" | ||||||
|     ], |     ], | ||||||
|  |     "Slim": [ | ||||||
|  |       ".slim" | ||||||
|  |     ], | ||||||
|     "Smalltalk": [ |     "Smalltalk": [ | ||||||
|       ".st" |       ".st" | ||||||
|     ], |     ], | ||||||
| @@ -740,8 +743,8 @@ | |||||||
|       ".gemrc" |       ".gemrc" | ||||||
|     ] |     ] | ||||||
|   }, |   }, | ||||||
|   "tokens_total": 614357, |   "tokens_total": 614434, | ||||||
|   "languages_total": 811, |   "languages_total": 812, | ||||||
|   "tokens": { |   "tokens": { | ||||||
|     "ABAP": { |     "ABAP": { | ||||||
|       "*/**": 1, |       "*/**": 1, | ||||||
| @@ -60170,6 +60173,70 @@ | |||||||
|       "ast.eval": 1, |       "ast.eval": 1, | ||||||
|       "Env.new": 1 |       "Env.new": 1 | ||||||
|     }, |     }, | ||||||
|  |     "Slim": { | ||||||
|  |       "doctype": 1, | ||||||
|  |       "html": 2, | ||||||
|  |       "head": 1, | ||||||
|  |       "title": 1, | ||||||
|  |       "Slim": 2, | ||||||
|  |       "Examples": 1, | ||||||
|  |       "meta": 2, | ||||||
|  |       "name": 2, | ||||||
|  |       "content": 2, | ||||||
|  |       "author": 2, | ||||||
|  |       "javascript": 1, | ||||||
|  |       "alert": 1, | ||||||
|  |       "(": 1, | ||||||
|  |       ")": 1, | ||||||
|  |       "body": 1, | ||||||
|  |       "h1": 1, | ||||||
|  |       "Markup": 1, | ||||||
|  |       "examples": 1, | ||||||
|  |       "#content": 1, | ||||||
|  |       "p": 2, | ||||||
|  |       "This": 1, | ||||||
|  |       "example": 1, | ||||||
|  |       "shows": 1, | ||||||
|  |       "you": 2, | ||||||
|  |       "how": 1, | ||||||
|  |       "a": 1, | ||||||
|  |       "basic": 1, | ||||||
|  |       "file": 1, | ||||||
|  |       "looks": 1, | ||||||
|  |       "like.": 1, | ||||||
|  |       "yield": 1, | ||||||
|  |       "-": 3, | ||||||
|  |       "unless": 1, | ||||||
|  |       "items.empty": 1, | ||||||
|  |       "table": 1, | ||||||
|  |       "for": 1, | ||||||
|  |       "item": 1, | ||||||
|  |       "in": 1, | ||||||
|  |       "items": 2, | ||||||
|  |       "do": 1, | ||||||
|  |       "tr": 1, | ||||||
|  |       "td.name": 1, | ||||||
|  |       "item.name": 1, | ||||||
|  |       "td.price": 1, | ||||||
|  |       "item.price": 1, | ||||||
|  |       "else": 1, | ||||||
|  |       "|": 2, | ||||||
|  |       "No": 1, | ||||||
|  |       "found.": 1, | ||||||
|  |       "Please": 1, | ||||||
|  |       "add": 1, | ||||||
|  |       "some": 1, | ||||||
|  |       "inventory.": 1, | ||||||
|  |       "Thank": 1, | ||||||
|  |       "div": 1, | ||||||
|  |       "id": 1, | ||||||
|  |       "render": 1, | ||||||
|  |       "Copyright": 1, | ||||||
|  |       "#": 2, | ||||||
|  |       "{": 2, | ||||||
|  |       "year": 1, | ||||||
|  |       "}": 2 | ||||||
|  |     }, | ||||||
|     "Smalltalk": { |     "Smalltalk": { | ||||||
|       "Object": 1, |       "Object": 1, | ||||||
|       "subclass": 2, |       "subclass": 2, | ||||||
| @@ -67089,6 +67156,7 @@ | |||||||
|     "ShellSession": 233, |     "ShellSession": 233, | ||||||
|     "Shen": 3472, |     "Shen": 3472, | ||||||
|     "Slash": 187, |     "Slash": 187, | ||||||
|  |     "Slim": 77, | ||||||
|     "Smalltalk": 423, |     "Smalltalk": 423, | ||||||
|     "SourcePawn": 2080, |     "SourcePawn": 2080, | ||||||
|     "SQL": 1485, |     "SQL": 1485, | ||||||
| @@ -67279,6 +67347,7 @@ | |||||||
|     "ShellSession": 3, |     "ShellSession": 3, | ||||||
|     "Shen": 3, |     "Shen": 3, | ||||||
|     "Slash": 1, |     "Slash": 1, | ||||||
|  |     "Slim": 1, | ||||||
|     "Smalltalk": 3, |     "Smalltalk": 3, | ||||||
|     "SourcePawn": 1, |     "SourcePawn": 1, | ||||||
|     "SQL": 5, |     "SQL": 5, | ||||||
| @@ -67314,5 +67383,5 @@ | |||||||
|     "Zephir": 2, |     "Zephir": 2, | ||||||
|     "Zimpl": 1 |     "Zimpl": 1 | ||||||
|   }, |   }, | ||||||
|   "md5": "92c117f774abe712958bb369c4e1dde9" |   "md5": "3e0901633ee5729c6dac371442522f33" | ||||||
| } | } | ||||||
							
								
								
									
										31
									
								
								samples/Slim/sample.slim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								samples/Slim/sample.slim
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | |||||||
|  | doctype html | ||||||
|  | html | ||||||
|  |   head | ||||||
|  |     title Slim Examples | ||||||
|  |     meta name="keywords" content="template language" | ||||||
|  |     meta name="author" content=author | ||||||
|  |     javascript: | ||||||
|  |       alert('Slim supports embedded javascript!') | ||||||
|  |  | ||||||
|  |   body | ||||||
|  |     h1 Markup examples | ||||||
|  |  | ||||||
|  |     #content | ||||||
|  |       p This example shows you how a basic Slim file looks like. | ||||||
|  |  | ||||||
|  |       == yield | ||||||
|  |  | ||||||
|  |       - unless items.empty? | ||||||
|  |         table | ||||||
|  |           - for item in items do | ||||||
|  |             tr | ||||||
|  |               td.name = item.name | ||||||
|  |               td.price = item.price | ||||||
|  |       - else | ||||||
|  |         p | ||||||
|  |          | No items found.  Please add some inventory. | ||||||
|  |            Thank you! | ||||||
|  |  | ||||||
|  |     div id="footer" | ||||||
|  |       = render 'footer' | ||||||
|  |       | Copyright © #{year} #{author} | ||||||
		Reference in New Issue
	
	Block a user