memory-leaks

Still reachable: lots of words in many pages.
git clone https://git.kevinlegouguec.net/memory-leaks
Log | Files | Refs | README | LICENSE

convert-internal-links.lua (250B)


      1 local config = require 'config'
      2 
      3 function Link(link)
      4   if link.target:match("^[%w]+://")
      5   then
      6     return link
      7   end
      8 
      9   for _, ext in pairs(config.EXTENSIONS)
     10   do
     11     link.target = link.target:gsub("%."..ext.."$", ".html")
     12   end
     13 
     14   return link
     15 end