From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33136 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: Parse metadata in defaults files as Markdown? Date: Fri, 29 Sep 2023 20:37:43 +0200 Message-ID: <87r0mgof6d.fsf@zeitkraut.de> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17911"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBMH43SUAMGQEMH5KAOI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Sep 29 23:14:31 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f59.google.com ([209.85.221.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qmKog-0004Mh-0H for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 29 Sep 2023 23:14:30 +0200 Original-Received: by mail-wr1-f59.google.com with SMTP id ffacd0b85a97d-314256aedcbsf11258255f8f.0 for ; Fri, 29 Sep 2023 14:14:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696022069; cv=pass; d=google.com; s=arc-20160816; b=WKhnrr2QFZ+a4A8DHklInSA6D4DF+7HGOV48/6dk39ZNQ+ayNpR7AwDmi5ssvJxgpD m3tOYLrmRskL4zk3ijYiTp80yh54X0mATm7ib7mUsNicvQaybbhwxLfUO3adXAvKAHHk GDzwMErj/4vCH6Pq6cA3QOC6MRdMxtXZ5wx/IJUXTObF0e1Jy1aWQ98e1bDu6VJhLtY2 j/bhneEZt6Qy5CoJ/CphXvnbl4LKk5pj6cZqrQR59Iwf+dK8vqHKBAD4fhRSc0xR4xnI 94/TOCuGxDzDgbIAPu9rjmh7taYksurr/54XwdbjPb0TOBIOKFtUrP5doqWMD49+p4aj mZkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :mime-version:message-id:in-reply-to:date:subject:to:from:references :sender:dkim-signature; bh=4NbU8i0IkvItOudYrbWbvvd5dfyEYSt4zPx3huBx2X0=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=KEGIzIFEBx4BMaLwume246k7jX3HOOJh9iAyQ14Tf587eAFhXn8aG9hvLMZUOZrACi FwQd/xCDeNvS7CTBs/yQOEOgvoeduM6Z03WwJVD4jPMdU4VBucG7+dZ99wGzdw3+N7e4 /tlZzFT/2Futewe0aP+EhzDOkuZe9FLyI9INQI3MAnyRSBw7XqR6DAK7C3rKNaSHrBmC 5RsOKIfF0XpwUdQ9m97c+f9woq3vvec+4mCKmEtN/EDfUZYGmYiXL34ZSOy4i71GG2IM rQsaH6keg+Wqxt+XnK1h3H526BejBFlhrSaK8kqGM4eVJQSa/lklGYb2PfjjkfSMtMvb DHNg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1696022069; x=1696626869; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:to:from:references:sender:from:to:cc:subject:date :message-id:reply-to; bh=4NbU8i0IkvItOudYrbWbvvd5dfyEYSt4zPx3huBx2X0=; b=UhXAUUhVq5PebdeT84+kXJu1K3NCiSDixMJPSo83I4tqI1Iq3pGnk1WKRxKrXssSOU LQxwxQ8qpDfTdBDCqrmekjctT7UultkAB1cp2rcq9rchMKjWn/E6LfOpixRJzvcE/QXH Wjt+e7bsEdcfrDvr7xEqwHWGriV0nuze0TzjcFel7kMq9ZKK8VTWMBaXr6WwznFtyU0F HFCX9UeynI4ATkNV6poUX9fgtvU2dS8EbETGscNumZU9TtHjgJ8d/gStnHpF2o36czoY zYNXqpUsd9CtvsZn X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696022069; x=1696626869; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:to:from:references:x-beenthere:x-gm-message-state:sender :from:to:cc:subject:date:message-id:reply-to; bh=4NbU8i0IkvItOudYrbWbvvd5dfyEYSt4zPx3huBx2X0=; b=sTJQeqtoTVPzk1nF9rUCo9H5NDbB9F9kn6XOebtg8ASsM1VPTq/2gMZByz0+zGIwfW XeLRSw59TDaV9HTcJp0ATS/MsW0kW24O8igzcS/0YOqPIQ7eUf4JCwkQkefxzD4dm21S uSL6bu1mXP1fxOjJgpxm11Z266TqRSCrzFl5LPpBv0qqqyzU23jpXklAEqceeS8WE751 ISoa2rUs1K6FN7GNew/rFQHDRk/sEAl+SmDlzMBqWYFEF7WL+vudG28ds4 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YwRMX87Ue+Wd2Nq8DAgcMKb9BuC9LlWOi6ZhBiTcy4PiWLmhN+I LgV9kaJBaWKh2sHTsoOTnBE= X-Google-Smtp-Source: AGHT+IGIBQXr/qJwMCIdc7/BtOqriqqq1IY2hVPxmwNYqQiIPN0lCVEergPIO3RamWC7lQrpaFS++g== X-Received: by 2002:a5d:414e:0:b0:320:1d1:71c4 with SMTP id c14-20020a5d414e000000b0032001d171c4mr4659092wrq.23.1696022068567; Fri, 29 Sep 2023 14:14:28 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:adf:d239:0:b0:323:2a96:51fa with SMTP id k25-20020adfd239000000b003232a9651fals2077815wrh.1.-pod-prod-06-eu; Fri, 29 Sep 2023 14:14:22 -0700 (PDT) X-Received: by 2002:a5d:6406:0:b0:31a:d2f9:7372 with SMTP id z6-20020a5d6406000000b0031ad2f97372mr4647281wru.29.1696022062790; Fri, 29 Sep 2023 14:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696022062; cv=none; d=google.com; s=arc-20160816; b=Uc6UqJr4fmuPdrg77gSnhgz8V2+kpdenKwAsCof/B8htLTZqbzmKDT44rRDnVqLKV6 Hgxrmdlzm7WC0bogMj0KqxsIQeHohZL1O+vANp6EU7h71wEaUAbq5mZJVfsS27aLLQQ+ 2fwcON29Yr/zqYsu9Oep4u5N2qXA1bd9hGPM+iMtZQ78ERzSszGLRCFdr6gxTiKW1cRv d0cuBP6Ssa4A0GMobRoV0qAjZMMWcvuzlPjAlVLmeWQCbdKXZ3B1ePvoYUfbvVtNDVhC 7BLlDAfd3bR3JdU6zMx6N+1ZptHha1JjWCNPzcIhqYOftX4r7I87LTz5CYrn1POJhrJh huKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:to:from:references; bh=QuMJvjYAhJA0SxD0VRlCX+F0zmlEKFaa1GaJ0rUQWi8=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=i5C9NLHmA6/aJq40a4Ft06X2RGzX5rKlf+sr5fRDYa2RXKVSlUm2lOToVlHbZX5Yu9 TEV8v5I7IAWAx7uSJa/pWqbS94yOi6HFOwJ4UtuN0fnvbWBZsXA9naNJpwPnhymuP52R 2vK5RI1gEOqVeahtJAvldwgUILbsA1UMy7VlkHxiwqJBmrbrv+M9WMwG/W9nxztygO2I MaBtLqf1XuQS9zm+/Nxg8mfGLXzfFF6Tdx5Al+wsYBIoR0e3NZ+Dv5a2GP3dkWAur3xr HwXps0j4H9LJ0kQhYnR58uP8/ik9AHwF2DbB13Z0PGeeejBsGFVUz4EQPEAQl9DyYgph 9yaQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org. [80.241.56.171]) by gmr-mx.google.com with ESMTPS id m2-20020a056512358200b005042ae499b9si1336607lfr.7.2023.09.29.14.14.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 14:14:22 -0700 (PDT) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) client-ip=80.241.56.171; Original-Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Ry34r29C1z9sWx for ; Fri, 29 Sep 2023 23:14:20 +0200 (CEST) In-reply-to: X-Rspamd-Queue-Id: 4Ry34r29C1z9sWx X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:33136 Archived-At: Martin Post writes: > In a Pandoc document=E2=80=99s YAML metadata block, or in a Pandoc metada= ta file, I can do this: > > variable1: __content__ > > =E2=80=A6and it will be rendered as content for HTML. > > Doing this in a Pandoc DEFAULTS file: > > metadata: > variable1: __content__ > > =E2=80=A6will render $variable1$ as =E2=80=9C__content__=E2=80=9D > > So =E2=80=93 is it possible to have metadata in a defaults file interpret= ed as Markdown? I think the only way would be to write a Lua filter that convert strings to Inlines. E.g.: local strings2md strings2md =3D function (meta) for key, value in pairs(meta) do if pandoc.utils.type(value) =3D=3D 'string' then -- Convert strings to Markdown local blocks =3D pandoc.read(value).blocks meta[key] =3D pandoc.utils.blocks_to_inlines(blocks) elseif pandoc.utils.type(value) =3D=3D 'List' then -- Recurse on lists meta[key] =3D strings2md(value) end end return meta end Meta =3D strings2md --=20 Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 --=20 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 e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/87r0mgof6d.fsf%40zeitkraut.de.