mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:42:44 +00:00 
			
		
		
		
	Previously all the added icons weren't available in the online version of the man pages. This patch adds functionality to copy all the used icons over when assembling the HTML version.
		
			
				
	
	
		
			16 lines
		
	
	
	
		
			460 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			460 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
| function Link(el)
 | |
|     el.target = string.gsub(el.target, "file:///bin/.*", "../cant-run-application.html")
 | |
|     el.target = string.gsub(el.target, "help://man/([^/]*)/(.*)", "../man%1/%2.html")
 | |
|     return el
 | |
| end
 | |
| 
 | |
| function Image(el)
 | |
|     local pattern = "/res/icons/(.*)"
 | |
|     local image = string.gsub(el.src, pattern, "%1")
 | |
| 
 | |
|     el.src = "../icons/" .. image
 | |
|     file = io.open("icons.txt", "a+")
 | |
|     file:write(image .. "\n")
 | |
|     file:close()
 | |
|     return el
 | |
| end
 |