@@ -384,8 +384,10 @@ consolidateInlines (x : xs) = x : consolidateInlines xs
384384consolidateInlines [] = []
385385
386386-- | Convert list of inlines to a string with formatting removed.
387+-- Footnotes are skipped (since we don't want their contents in link
388+-- labels).
387389stringify :: [Inline] -> String
388−stringify = query go
390+stringify = query go . walk deNote
389391 where go :: Inline -> [Char]
390392 go Space = " "
391393 go (Str x) = x
@@ -393,6 +395,8 @@ stringify = query go
393395 go (Math _ x) = x
394396 go LineBreak = " "
395397 go _ = ""
398+ deNote (Note _) = Str ""
399+ deNote x = x
396400
397401-- | Change final list item from @Para@ to @Plain@ if the list contains
398402-- no other @Para@ blocks.