Dear Pandoc users, I had a small Pandoc filter that extended each subheading with a link back to its parent heading. However, this changes the heading text (by adding the link text), which showed up in the table of contents. I did not want this, and since I use HTML output, I could use some CSS to hide the extra text. This was possible because the extra text was in a element. However, since pandoc 2.19, the extra text is just appended, without a . Thus I cannot hide it the same way. Is there a workaround? To give a concrete example, consider this simple markdown: # My Title ## Chapter 1 Foo ## Chapter 2 Bar This is a simplified version of my filter: local function head_add_backlink (head) head.content:extend( { pandoc.Link( "▴", "#my-title", "", pandoc.Attr("", {'link-back'}) ) } ) return head end return { { Header = head_add_backlink } } I am running this with pandoc --toc --lua-filter=my_filter.lua -t html -s test.md With pandoc 2.18, the table of contents looked like this:
  • Chapter 1
  • With 2.9 it looks like this
  • Chapter 1▴
  • Notice that there is no more that I can use to hide the "▴" character. Is there a simple way to achieve my goal with 2.19, i.e. have backlinks in each header yet not show these backlinks in the table of contents? Thanks for any help in advance, Szabolcs -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/a9663214-8b54-4f70-8dcf-8b726ac9b121n%40googlegroups.com.