The latest changes seem to have broken my hanging indent filter again. I tried to return to the previous version (see below), but this does not work either. What am I doing wrong.

And again: Wouldn’t it be a good idea if the latex writer added a `\begin{references} \item [entry] \item [entry] …  \end{references}` environment itself, with a suitable definition in the template(s)?

~~~
#!/usr/bin/env runhaskell

-- addRefEnvItem.hs

import Text.Pandoc.JSON

main :: IO ()
main = toJSONFilter addRefEnvItem

addRefEnvItem :: Maybe Format -> Block -> Block
addRefEnvItem (Just (Format "latex"))
  (Div ("",["references"],[]) (h@(Header _ _ _) : blocks)) =
  Div ("",["references"],[])
    ( [h, latex "\\begin{references}\\sloppy"] ++
    concatMap addItem blocks ++ [latex "\\end{references}"] )
  where latex = RawBlock (Format "latex")
addRefEnvItem _ x = x

addItem :: Block -> [Block]
addItem x = [RawBlock (Format "latex") "\\item", x]
~~~

--
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/e1ffc34d-9306-4988-9218-47c6996c6c3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.