mirror of
				https://github.com/imfing/hextra.git
				synced 2025-11-04 01:04:54 -05:00 
			
		
		
		
	
		
			
	
	
		
			14 lines
		
	
	
		
			400 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			14 lines
		
	
	
		
			400 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| 
								 | 
							
								{{ $filename := .filename | default "" -}}
							 | 
						||
| 
								 | 
							
								{{ $lang := .lang | default "" }}
							 | 
						||
| 
								 | 
							
								{{ $content := .content }}
							 | 
						||
| 
								 | 
							
								{{ $options := .options | default (dict) }}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								{{- if $filename -}}
							 | 
						||
| 
								 | 
							
								  <div class="filename" dir="auto">{{ $filename }}</div>
							 | 
						||
| 
								 | 
							
								{{- end -}}
							 | 
						||
| 
								 | 
							
								{{- if transform.CanHighlight $lang -}}
							 | 
						||
| 
								 | 
							
								  <div>{{- highlight $content $lang $options -}}</div>
							 | 
						||
| 
								 | 
							
								{{- else -}}
							 | 
						||
| 
								 | 
							
								  <pre><code>{{ $content }}</code></pre>
							 | 
						||
| 
								 | 
							
								{{- end -}}
							 |