From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30029 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Russ Newsgroups: gmane.text.pandoc Subject: Re: Reading a multi line yaml key - results in text surrounded in html

tags? Date: Fri, 21 Jan 2022 08:37:34 -0800 (PST) Message-ID: <899d9fd4-dfae-48d7-ab33-3d55b81f540cn@googlegroups.com> References: <87zgnpl6wc.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2890_1608387727.1642783054489" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23029"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC77N3USRAPBBT6CVOHQMGQERPSZJ6Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jan 21 17:37:39 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f55.google.com ([209.85.210.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nAwux-0005kf-Al for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 21 Jan 2022 17:37:39 +0100 Original-Received: by mail-ot1-f55.google.com with SMTP id h17-20020a9d7991000000b0059b4230fc63sf5763395otm.13 for ; Fri, 21 Jan 2022 08:37:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=Dxbxyxs80uA9KgW3xIPvn2fFCVRDW9tQtLxtGHB0lE4=; b=ZziDgPtPA7VaphIFMsNbLT69BrL0p04lKtPYctk48GcVliidVH6BxpwS56f3WYLFTh 3zZ5BLV0NvWtzAkb7wjs/gF+PunrTQS/WsLxYPXhoy7aAFp+rVAP59975uMRDS5Ont9z 2YNZjVmNsXADeZzYL9Mi2zt/nqcmnM+w8tMjnMTdcYt87gp5DH3Z8lK02gFZXmXBncCq MtgdH6hwzZeX42c2rXPNyrixJpHxvCQjdarYfSy8yu5MpRAu52R/sKHaOuZNc1TUhnLc YNp6Vr1xU+0AFu55mdMBWJbIeftIN+EQpCj9eUjDIlhyqY3vZUtxPodMDN0SDDPF8kk+ Njmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=Dxbxyxs80uA9KgW3xIPvn2fFCVRDW9tQtLxtGHB0lE4=; b=xQCJPjMjy3rLdjxNkMkWF5fZu/DVISLTMU3IRdZeqs0KzmkT/h+VtHQF63dldQQAnm xRLXfRGDy5hy2s3ThepDuvVHx/AyQRWzJAbduYDex67oyFbnicQohlUGojBZE8xQuTSz /nlMoLXa+B17pS5v4CpDJ5Cs1w3X1pxid3isFcLEGEz9udMflzDtU/igEn8AWu5fd7CK TLV8l7o2BqXo6uMxH/ks1djaV5gX95hH5eR2QRUZfNTKVBaTq2boIiogVffvnwUGbJQy u5qpKNkFBBQag3BtCBSkKesa+ER76Ly80iSZPRNchkSfa+IkJ+51gPhJ3KbcA6nySmAp YXJQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533i0LTmURPGc9+5JdiGJsV4/CUwd0T0bwn0XGEzPPcZBKznYYQV 3ZSDXwxVw/a6pwMS4SAdZ7w= X-Google-Smtp-Source: ABdhPJx7fS77RlCA9DHTMdwf7rZjjcL3HrVUxk4tRTdlaVyayaUgThRpOUTKWCO8y/TsZSmXVeSEhw== X-Received: by 2002:a4a:db96:: with SMTP id s22mr3112732oou.66.1642783057298; Fri, 21 Jan 2022 08:37:37 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:3245:: with SMTP id y66ls3137971oiy.3.gmail; Fri, 21 Jan 2022 08:37:35 -0800 (PST) X-Received: by 2002:aca:1703:: with SMTP id j3mr1194735oii.137.1642783054957; Fri, 21 Jan 2022 08:37:34 -0800 (PST) In-Reply-To: <87zgnpl6wc.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: info-ckBjHRpK5r9MPTj2movljOTW4wlIGRCZ@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:30029 Archived-At: ------=_Part_2890_1608387727.1642783054489 Content-Type: multipart/alternative; boundary="----=_Part_2891_1817929670.1642783054489" ------=_Part_2891_1817929670.1642783054489 Content-Type: text/plain; charset="UTF-8" Thanks everyone for your help, the post by Albert about the changes to Lua and the splendid code of course solved the problem, well nearly... In the YAML Frontmatter we have a description: description: | Some long, perhaps multi-line description. Sadly this *does not* appear in the epub (2) metadata when we build it, it used to work. This does seem like some sort of bug? Because if we use commas to surround the description text or use '>-' as suggested by Albert, the description *does* appear in the epub metadata. However, we have a lot of markdown which use the '|' formatting for multi-line so I'd rather not have to change this is I don't have to. Does anybody have any ideas? On Friday, 21 January 2022 at 10:28:45 UTC Albert Krewinkel wrote: > There's also the option to use `>-` instead of `|`. It works almost the > same as `|`, but removes all line breaks (including the final one). > > BPJ writes: > > > Or if needed use single quotes around the value to protect punctuation > > marks, noting that to include a single quote in a YAML single-quoted > > string you use two single quotes, as in `'don''t'`. > > > > Den tors 20 jan. 2022 22:42John MacFarlane skrev: > > > > One workaround is to use a Lua filter that > > applies pandoc.utils.stringify to the contents of the > > 'volume' field in metadata. > > Russ writes: > > > pandoc 2.17.0.1 > > > Reading a multi line YAML front matter and outputing the text now > > gets a > > > text string with html

tags. > > > > > > For example > > > ```yaml > > > volume: | Volume 16: A Subtitle ``` > > > Should produce: > > > "Volume 16: A Subtitle" > > > > > > But now produces: > > > "

Volume 16: A Subtitle

" > > > > > > Is there a way to avoid these html tags or is it a bug? I cannot > > say for > > > sure that this has changed in this specific version, but it is > > certainly > > > quite a recent change. > > > > > > -- > > > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/pandoc-discuss/e17cd72d-2900-476c- > > a945-77d9e2e722bcn%40googlegroups.com. > > -- > > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/pandoc-discuss/yh480ksfti2igy.fsf% > > 40johnmacfarlane.net. > > > > -- > > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBEViWZsLRRtAr78 > > yn3Q3fSZswg85vut21vkrpfsvszXQ%40mail.gmail.com. > > > -- > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/899d9fd4-dfae-48d7-ab33-3d55b81f540cn%40googlegroups.com. ------=_Part_2891_1817929670.1642783054489 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks everyone for your help, the post by Albert about the changes to= Lua and the splendid code of course solved the problem, well nearly...

In the YAML Frontmatter we have a description:
<= div>
description: |=20 Some long, perhaps multi-line description.

Sadly this does not appear in the epub (2) metadata when we build = it, it used to work. This does seem like some sort of bug? Because if we us= e commas to surround the description text or use  '>-' as suggested= by Albert, the description does appear in the epub metadata. Howeve= r, we have a lot of markdown which use the '|' formatting for multi-line so= I'd rather not have to change this is I don't have to.

Does anybody have any ideas?


<= div class=3D"gmail_quote">
On Friday,= 21 January 2022 at 10:28:45 UTC Albert Krewinkel wrote:
There's also the option to = use `>-` instead of `|`. It works almost the
same as `|`, but removes all line breaks (including the final one).

BPJ <mel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org= > writes:

> Or if needed use single quotes around the value to protect punc= tuation
> marks, noting that to include a single quote in a YAML single-q= uoted
> string you use two single quotes, as in `'don''t= 9;`.
>
> Den tors 20 jan. 2022 22:42John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:
>
> One workaround is to use a Lua filter that
> applies pandoc.utils.stringify to the contents of the
> 'volume' field in metadata.
> Russ <in...@sho= esforindustry.net> writes:
> > pandoc 2.17.0.1
> > Reading a multi line YAML front matter and outputing the= text now
> gets a
> > text string with html <p> tags.
> >
> > For example
> > ```yaml
> > volume: | Volume 16: A Subtitle ```
> > Should produce:
> > "Volume 16: A Subtitle"
> >
> > But now produces:
> > "<p>Volume 16: A Subtitle</p>"
> >
> > Is there a way to avoid these html tags or is it a bug? = I cannot
> say for
> > sure that this has changed in this specific version, but= it is
> certainly
> > quite a recent change.
> >
> > --
> > 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 p= andoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> > To view this discussion on the web visit
> https://groups= .google.com/d/msgid/pandoc-discuss/e17cd72d-2900-476c-
> a945-77d9e2e722bcn%40goog= legroups.com.
> --
> You received this message because you are subscribed to the G= oogle
> Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from= it,
> send an email to p= andoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit
> https://grou= ps.google.com/d/msgid/pandoc-discuss/yh480ksfti2igy.fsf%
> 40johnmacfarlane.net<= /a>.
>
> --
> You received this message because you are subscribed to the Goo= gle
> Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from i= t, send
> an email to
pandoc-d= iscus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit
> https://g= roups.google.com/d/msgid/pandoc-discuss/CADAJKhBEViWZsLRRtAr78
> yn3Q3fSZswg85vut21vkrpfsvszXQ%4= 0mail.gmail.com.


--=20
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/899d9fd4-dfae-48d7-ab33-3d55b81f540cn%40googlegroups.= com.
------=_Part_2891_1817929670.1642783054489-- ------=_Part_2890_1608387727.1642783054489--