I figured out my mistake. The first codeblock has a comma separating the attributes. This somehow causes pandoc to assume this is not a codeblock.

So now the filter works!

On Wednesday, January 21, 2015 at 8:28:39 PM UTC+5:30, Mohammed Haris Minai wrote:

Well, I am simply completely uncomfortable with Haskell (and python as well). Anyway having seen the gitit and the examples john has given I gave it a shot.

Am attching the filter (Example.hs), a sample pdc file(input.pdc) and the markdown output I get when I use the filter (output.pdc). Somehow my first code block is not transformed whereas the second one is. Could someone please help me out here.

I compiled Example.hs file using "ghc --make Example.hs" then used:

pandoc --filter ./Example -t markdown input.pdc > output.pdc

This is the first time I have touched haskell code, so please forgive any blunders I have made, I have simply tried to combine the gitit plugin with some code pointed out earlier to me by jon + some understanding from what the pandoc page says about scripting. I almost have no idea how it is even working.

On Wednesday, January 21, 2015 at 5:42:33 PM UTC+5:30, Ivan Miljenovic wrote:
Is there any reason you can't use that gitit filter directly?

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ff78de30-d031-4b5b-9021-be32c111db2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.