Aidan Reilly <aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> writes:
> Thanks Albert!
>
> I really appreciate you looking at this. When I run the above, I get
> this error:
>
> Error running filter admonitions.lua:
> admonitions.lua:10: attempt to index a nil value (local 'opts')
> stack traceback:
> admonitions.lua:10: in main chunk
The most likely cause for this is an older pandoc version. The
`PANDOC_WRITER_OPTIONS` global was introduced in pandoc 2.17.
The filter can be made more robust by replacing line 9 with
```lua
local opts = PANDOC_WRITER_OPTIONS or {columns = 72}
```
That will ensure that the filter works even with older pandoc versions
(but with reduced functionality in that case).
--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124
--
You received this message because you are subscribed to a topic in the Google Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pandoc-discuss/65G0Kuih1wA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/875yft5wqc.fsf%40zeitkraut.de.