On Thursday, November 24, 2016 at 12:24:45 AM UTC+1, BP Jonsson wrote: > If more JavaScript is odious to you a filter which modifies the static > content may seem a little better. Here are both a HTML (output) filter > > pandoc -t html5 input.md | perl html-self-links.pl >output.html > > and a pandoc filter > > pandoc -F pandoc-self-links.pl -t html5 input.md -o output.html > > doing the same thing. > > > > I don't know which is faster so you may want to time them if it is > important. The html filter has the advantage that you can modify existing > HTML files with it. > > /bpj > > *Thank you!* The big advantages of using a filter is that also textbased browsers enjoy selflinks plus computing has just to be done once. Here are the test results with MANUAL.txt as input file: *Without filter* % time pandoc -s -t html5 MANUAL.txt -o output.html real 0m0.366s user 0m0.368s sys 0m0.000s *html-self-links.pl* % time { pandoc -s -t html5 MANUAL.txt | perl html-self-links.pl > output.html ; } real 0m0.516s user 0m0.556s sys 0m0.012s *pandoc-self-links.pl* % time { pandoc -s -F pandoc-self-links.pl -t html5 MANUAL.txt -o output.html ; } real 0m2.362s user 0m2.360s sys 0m0.020s -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/bb4ed5a7-c81e-420b-bdc6-74a3b675a653%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.