-- extract the individual parts of the link (up to 2 parts: optional filename, id)
localparts=split(extract_text,"+++")
localfilename=nil
@@ -71,24 +75,24 @@ function CustomTagsToLinks(el, prefix)
elseif#parts==2then
id=parts[2]
else
-- skip, it is malformed
new_content:insert(child)
gotocontinue
error(string.format("%s\nInvalid reference: '%s' does not have the correct format. It should be %s+++<id> or %s+++<filename>+++<id>",pandoc.utils.stringify(child),child.text,prefix,prefix))