cleanup local links in gemini
This commit is contained in:
parent
4082e7cecd
commit
ad88a46531
|
@ -217,11 +217,12 @@ function firstPass()
|
|||
elseif string.match( line, "^=>") then -- LINKS
|
||||
local dest, text = getLink( line )
|
||||
if string.match( dest, "^%./") then --local links
|
||||
local t = string.match( text, "^{(.-)}$" )
|
||||
local cleantext = string.match( text, "^{(.-)}$" ) -- see if wikilink and clean
|
||||
local htmldest = string.gsub( dest, "gmi", "html" )
|
||||
if t ~= nil then -- wikilink
|
||||
if cleantext ~= nil then -- wikilink
|
||||
local close = closeTags()
|
||||
out.web = string.format("%s<p><a href='%s' class='arrow'>%s</a></p>",close,htmldest,t)
|
||||
out.web = string.format("%s<p><a href='%s' class='arrow'>%s</a></p>",close,htmldest,cleantext)
|
||||
out.gem = string.format("=> %s %s",dest,cleantext)
|
||||
|
||||
elseif isImagePath( dest ) then -- images
|
||||
local img = string.format('<img src="%s" alt="%s" loading="lazy"/>',dest,text)
|
||||
|
|
Loading…
Reference in New Issue