mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	New JSX language under JavaScript group
A specific grammar is needed to highlight .jsx files Thus, there are now in a distinct language but still in the JavaScript group
This commit is contained in:
		
							
								
								
									
										23
									
								
								samples/JSX/sample.jsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								samples/JSX/sample.jsx
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| const React = require('react') | ||||
|  | ||||
| module.exports = React.createClass({ | ||||
|   render: function() { | ||||
|     let {feeds, log} = this.props; | ||||
|  | ||||
|     log.info(feeds); | ||||
|     return <div className="feed-list"> | ||||
|       <h3>News Feed's</h3> | ||||
|       <ul> | ||||
|         {feeds.map(function(feed) { | ||||
|           return <li key={feed.name} className={feed.fetched ? 'loaded' : 'loading'}> | ||||
|             {feed.data && feed.data.length > 0 ? | ||||
|               <span>{feed.name} <span className='light'>({feed.data.length})</span></span> | ||||
|               : 'feed.name' } | ||||
|           </li> | ||||
|         })} | ||||
|       </ul> | ||||
|     </div>; | ||||
|   } | ||||
| }); | ||||
		Reference in New Issue
	
	Block a user