mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
This commit is contained in:
		
				
					committed by
					
						 Lunny Xiao
						Lunny Xiao
					
				
			
			
				
	
			
			
			
						parent
						
							9aa8fdc5d7
						
					
				
				
					commit
					f86f56e19c
				
			| @@ -223,6 +223,10 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st | |||||||
|  |  | ||||||
| 			var output bytes.Buffer | 			var output bytes.Buffer | ||||||
| 			lines := strings.Split(fileContent, "\n") | 			lines := strings.Split(fileContent, "\n") | ||||||
|  | 			//Remove blank line at the end of file | ||||||
|  | 			if len(lines) > 0 && lines[len(lines)-1] == "" { | ||||||
|  | 				lines = lines[:len(lines)-1] | ||||||
|  | 			} | ||||||
| 			for index, line := range lines { | 			for index, line := range lines { | ||||||
| 				line = gotemplate.HTMLEscapeString(line) | 				line = gotemplate.HTMLEscapeString(line) | ||||||
| 				if index != len(lines)-1 { | 				if index != len(lines)-1 { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user