From: Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: manipulating headline level
Date: Thu, 30 Jun 2022 14:11:42 +0200 [thread overview]
Message-ID: <871qv6bb4n.fsf@zeitkraut.de> (raw)
In-Reply-To: <Yr1iPDuHSwZZXmZs@odysseus>
"'juh' via pandoc-discuss" <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> writes:
> [...] I don't use the dev version of pandoc.
>
> So when I call it like this:
>
> pandoc -f script.lua -o test.html 00.md 01/00.md ...
>
> I get:
>
> Error running Lua:
> input.lua:9: attempt to concatenate a Pandoc value (local 'doc')
> stack traceback:
Here's a polyfill for the missing feature. Adding it before or after
the other code should make the reader work with pandoc 2.18.
``` lua
if PANDOC_VERSION <= {2, 18} then
local mt = debug.getmetatable(pandoc.Pandoc{})
mt.__concat = function (a, b)
local result = pandoc.Pandoc(a.blocks, a.meta)
result.blocks:extend(b.blocks)
for k, v in ipairs(b.meta) do
result.meta[k] = v
end
return result
end
end
```
--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124
next prev parent reply other threads:[~2022-06-30 12:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 8:30 'juh' via pandoc-discuss
2022-06-29 12:08 ` Albert Krewinkel
[not found] ` <87ilojbqsp.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-06-29 16:18 ` BPJ
[not found] ` <CADAJKhAWO5D23ChNizSGSuO-ouwOibBFTs0MmyBwJPGpQZYsVg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-06-30 8:43 ` 'juh' via pandoc-discuss
2022-06-30 12:11 ` Albert Krewinkel [this message]
[not found] ` <871qv6bb4n.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-06-30 14:10 ` 'Jan Ulrich Hasecke' via pandoc-discuss
[not found] ` <edfc1a65-e8ee-7e0e-f953-a4d75b19d8cb-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2022-06-30 14:37 ` 'Jan Ulrich Hasecke' via pandoc-discuss
[not found] ` <da9e1abc-97aa-339f-0eb6-720a5072e653-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2022-06-30 14:43 ` Albert Krewinkel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qv6bb4n.fsf@zeitkraut.de \
--to=albert+pandoc-9eawchwdxg8hfhg+jk9f0w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).