Revert "Add internal link checker"

This reverts commit dbed30c659.
For whatever reason, some erroneous links are not detected with
this script, but are detected with epubchecker. So let's just use
epubchecker when the time comes.
This commit is contained in:
Michael Reed 2020-06-15 18:42:39 -04:00
parent e790ed3b92
commit 5857550a43
2 changed files with 0 additions and 28 deletions

View file

@ -59,7 +59,6 @@ out/plfa.epub: out/ $(AGDA) $(LUA) epub.css fonts/*.ttf
--css=epub.css \
--epub-embed-font='fonts/*.ttf' \
--lua-filter include-files.lua \
--lua-filter check-internal-links.lua \
--lua-filter default-code-class.lua -M default-code-class=agda \
--standalone \
--fail-if-warnings \

View file

@ -1,27 +0,0 @@
-- Source: https://github.com/jgm/pandoc/issues/1621#issuecomment-613336520
local identifiers = {}
function Block (b)
if b.identifier then
identifiers[b.identifier] = true
end
end
function Inline (i)
if i.identifier then
identifiers[i.identifier] = true
end
end
function Link (l)
local anchor = l.target:match('#(.*)')
if anchor and not identifiers[anchor] then
io.stderr:write("broken link: " .. anchor .. "\n")
end
end
return {
{Block = Block, Inline = Inline},
{Link = Link}
}