From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28669 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Syntax errors in YAML blocks Date: Mon, 21 Jun 2021 16:36:08 +0200 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000849f3805c54798f0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32537"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBYOHYKDAMGQEWAOBMWY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jun 21 16:36:20 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f55.google.com ([209.85.128.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lvL2B-0008EM-Ay for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 21 Jun 2021 16:36:19 +0200 Original-Received: by mail-wm1-f55.google.com with SMTP id u17-20020a05600c19d1b02901af4c4deac5sf60653wmq.7 for ; Mon, 21 Jun 2021 07:36:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1624286179; cv=pass; d=google.com; s=arc-20160816; b=ivbKTeAiSvDqzrnIVOkoTc9bqppoUwjWO1vUUj5soScLhyB89PhYUfpPNXfHrEzxOu K5mWxjeaD2kAkN9OjXYrk+8yXBf9NWmNP5i9wl2z0bbOhCzkGGGEPqpdSevAGif2qDlW dEvs8VNge7HUph8BfsFpm7ExQrRvONT3nRK4p6lP0pYOAQJO1phZbn7TGUMRJG1ErbHa 3fh/tgTFJZ/IRJRhT8ldZT4jD7FyIKrSac8+URuh+mS97MzHRyq8ht2onkQWCwi+BUc5 /BYrtrLbKDGWKFeWlOVeY9qcn1gjW2+m5NneXKfjFWF0lU7iEi3j5uinKqA4cdTtr179 XmuA== 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:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:sender:dkim-signature; bh=C12gjJxiDJMD7ocrmUpALJ2PmedGEJGcZxQVGHMoeJ0=; b=PqRKeNkZWIpP3BEWqPpIsnOAka/K+6Zv0idlOorcig/2CtXChIM+XM/WqKIFm8K5Zr elzq8/FV60/clOxIyO/nhpsXe9cJyB1FYPk50TXyDxTyCUxNX1EC8f11PR/XD6EOzmyM a2tn3cA7hfIHDI1GYuEE4ifHV2KhtQaR2h7divsEYcMp29E4yBeNrIA8IBbkhb9En145 i/DbqnuD29qpWUzFF5mTwaxtD9pWASGHszZbAPXsT6L7eSiDtL/LAJWyOHJxVM2/bwwl xRuFHZWBSOP282Dina6UzwZDehWph+zJ2QctusJ18bcvnTTCZlFAYcm+DXDqvuyJrxM4 Y7Yg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.167.43 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:references:in-reply-to:reply-to:from:date :message-id:subject:to:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=C12gjJxiDJMD7ocrmUpALJ2PmedGEJGcZxQVGHMoeJ0=; b=IKDdD8GtlcAbqTuZcp6UZYUAZ9Ua+CbE94wH85qNq7lN6ok4iAQ5I2yqKgazum9lvS l0ZiWOxea+RTOccnAF80Pgnf8eHv79bE1h6dMfvizmymR0COqnyfeMX5SWsLQDspd5xF k02Lur1t2uirAr0dbV5QwcBlIxt8vAp2fnNTXOtZbLM1V7RM/KwbeePDaCsnnClk52OU vMheLxysYaD6h7ZwbmXrhOrF/EqEvrnYDWaREJVlobOw09ACo5CwA9c7caDkpTXqogV0 IyeF7gz59dS2VpVbXhcuvVRMjc8zbPUz2rHDpN+BD2C3oRbxkERbjeNHBJiPYdKIwin1 Bb5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:references:in-reply-to :reply-to:from:date:message-id:subject:to:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=C12gjJxiDJMD7ocrmUpALJ2PmedGEJGcZxQVGHMoeJ0=; b=gl6T/dj1t41nsK5GFCGOTGAYGRzP9Q9tFR+DrZIecdZPtcH9P68JhWr2W8ZVAQi/5l vrdOyy3brZEEyO7wdq5j3HoraAatmmq4zO3Q397JWScuGusVKAGdAXKUwrspKIs4eJqX kO4cXTjL29jlxcp9DJjN1Qam200uajSgA8POFX6unXUHfY+BUB8wPbZWmP6bR31ZVs+C +zzfr1EWl8mTdsECAz5rIJHhUOjJY4qjmnfrGZdHzUDGu2EUX1TSs3GLyetj+qLcYk// ChN/SIkV9Ac3zqtZOzxPHwzIQncKJTiqV3Zv1w6aLWDgvkPSzKOI+8+qtuM36SmCXucG noPw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533SnSkDh2skp5VEyZI8k2IsuZZAHzLPx0A5HudUTxNX0fHaEnFD fZDlIAl8cT6v79+PDNcBD+o= X-Google-Smtp-Source: ABdhPJzpG9A4skHQkfGBHEUwHerFkBEtnK9F2/RmUNYGUErivOc1ms7/RT5/mAYHk4vFI22/nI6Uxw== X-Received: by 2002:a1c:2601:: with SMTP id m1mr26410118wmm.185.1624286179029; Mon, 21 Jun 2021 07:36:19 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a7b:c0d1:: with SMTP id s17ls9156082wmh.0.gmail; Mon, 21 Jun 2021 07:36:16 -0700 (PDT) X-Received: by 2002:a05:600c:1c9e:: with SMTP id k30mr13454034wms.9.1624286176538; Mon, 21 Jun 2021 07:36:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624286176; cv=none; d=google.com; s=arc-20160816; b=DSil4hfokrj9U9t6544mgRzgduxPWdi8VEt+bBq/yU4jWY/nnpJIW7HWrsyCmFLL/+ Qosx+Tv/xkFPbCyXGIQEc1Egr+KI3C/wnd9ROkYvqDOO0bpUSUhGg0hEiGI7MdkQv6KY nd88IKTIQ1QrmYYKcQckDSLeqsJJzrJorrYdFAC9PVJg9xZ3VRXiwT28K/DWQjC1EbmP Kr6mdHuHEsLsfuVPlQaLDE3+mNVWvmObFM8vT5RvfnyaTpL8MDeNNeiPxUFbKBPftY92 AkNy511vTVEvNacoasf2YAsP4VbvSjRWbIE0+2UQkMVaLwkGmRQ0ewCjtjyiac1gmKeA uMyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version; bh=7WqLiSV2uVVDg3v7ykG+011yEJ1DeADCor0p6ksdEQc=; b=Nwa1lOg49qdbrslJ6QvrtqaBTVxfn5Rzdx/4iwQvV28ARhn1hi27s70cf9xC7Dmrzn INdpKhbTfHW668MGLOvzUKo3Jz0J5nxyBRzl+E54AOrGbD/7giqbMokLcsj38ntwtiSJ x6sB+eVWFl/6qVGNpoioY3811nn2psPMQD6vlZhxMSjBw9PvAYVZ+jLGWBu6bR7Ncd5Q gaHQQuW5VUoW5by/xjSBx58CL9xPFpWJ67EVapUypEpofF3FJUjJZOcVCEqLdcuDsIkw LTL3NF40p6dkdiMEHQw3XfOgpUMFRny1pB8iwns0LccgxfQWsxWkumeQdrePYUmP7dTt UPnQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.167.43 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Original-Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by gmr-mx.google.com with ESMTPS id q22si455838wrz.3.2021.06.21.07.36.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Jun 2021 07:36:16 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.167.43 as permitted sender) client-ip=209.85.167.43; Original-Received: by mail-lf1-f43.google.com with SMTP id r5so30623512lfr.5 for ; Mon, 21 Jun 2021 07:36:16 -0700 (PDT) X-Received: by 2002:a19:6a19:: with SMTP id u25mr11997360lfu.313.1624286175730; Mon, 21 Jun 2021 07:36:15 -0700 (PDT) In-Reply-To: X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.167.43 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@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:28669 Archived-At: --000000000000849f3805c54798f0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It used to work. Den m=C3=A5n 21 juni 2021 15:44William Lupton skrev: > All, > > I don't know how I missed this before, but I have noticed that this isn't > treated as a valid YAML block (at least not with pandoc 2.11.4). > > *% *cat comment.md > > --- > > # comment > > ... > > *% *pandoc comment.md > >
> >

comment

> >

=E2=80=A6

> > Inserting some YAML works: > > *% *cat comment-plus-variable.md > > --- > > # comment > > variable: 42 > > ... > > *% *pandoc comment-plus-variable.md > > > > I realise that this is an abuse, and that I could have used an HTML > comment (for example), but I believe that this is valid YAML, so should i= t > have worked? > > *% *yq eval comment.md > > > > # comment > > > > *% *yq eval comment-plus-variable.md > > # comment > > variable: 42 > > Apologies if this behaviour has changed in the latest pandoc... > > Thanks, > William > > On Thu, 3 Jun 2021 at 09:10, William Lupton > wrote: > >> Thanks! >> >> On Thu, 3 Jun 2021 at 05:49, John MacFarlane wrote: >> >>> >>> These are good suggestions. I've revised the manual accordingly. >>> >>> BPJ writes: >>> >>> > Perhaps it should be pointed out that the body of YAML block scalars >>> must >>> > be indented relative to the line with the `|` or `>`. Not doing so is >>> > indeed a YAML syntax error, so Pandoc does the right thing when not >>> > considering it valid YAML, however unfortunate it is that Pandoc may >>> think >>> > it is something else. >>> > >>> > The overview of YAML syntax on Wikipedia is quite good. Perhaps the >>> manual >>> > could link to (some specific version of) it. >>> > >>> > https://en.m.wikipedia.org/wiki/YAML#Syntax >>> > >>> > Den ons 2 juni 2021 21:21John MacFarlane skrev: >>> > >>> >> >>> >> The problem is that basically anything is valid Markdown, >>> >> it's just a matter of how it is interpreted. It does seem >>> >> to me that in the second case we might want to at least emit >>> >> a warning -- if not downright fail. It's just so unlikely >>> >> that someone would write a block beginning with `---` >>> >> and ending with `...` and intend it to be something other >>> >> than YAML metadata. If you'd like, you could submit an >>> >> issue for this. I'd rather not suggest avoiding complex >>> >> YAML blocks -- sometimes they're fine, if the syntax is >>> >> correct! >>> >> >>> >> William Lupton writes: >>> >> >>> >> > Thanks. Yes, I guess I realised it had something to do with >>> ambiguous >>> >> > grammars, but I hadn't really considered that my input was a valid >>> table >>> >> > (mea culpa). >>> >> > >>> >> > So I thought aha! I'll change the terminating "---" to "..." (in >>> the hope >>> >> > of an error), but this of course gives the output shown below. >>> >> > >>> >> > I wonder whether there could be a warning in the manual (or maybe >>> there >>> >> is >>> >> > and I've missed it?) and/or perhaps a suggestion that it might be = a >>> good >>> >> > idea to avoid complex YAML metadata blocks (in favour of metadata >>> files)? >>> >> > I'd be happy to create an issue and/or a MANUAL.md pull request. >>> >> > >>> >> > % cat bad.md >>> >> > --- >>> >> > history: >>> >> > - number: Release 1.2 >>> >> > changes: | >>> >> > - TBD >>> >> > ... >>> >> > >>> >> > % pandoc bad.md >>> >> >
>>> >> >

history: - number: Release 1.2 changes: | - TBD =E2=80=A6

>>> >> > >>> >> > >>> >> > On Wed, 2 Jun 2021 at 17:47, John MacFarlane >>> wrote: >>> >> > >>> >> >> >>> >> >> Well, this actually IS a valid "simple table". So how is >>> >> >> pandoc to know that you intended it as a YAML metadata block? >>> >> >> Pandoc tries first to parse things as YAML blocks, and then as >>> >> >> tables, if either works, the parse succeeds with no error. >>> >> >> >>> >> >> William Lupton writes: >>> >> >> >>> >> >> > Should I expect syntax errors in YAML blocks to be detected and >>> >> reported? >>> >> >> > >>> >> >> > This has a syntax error in the YAML block: >>> >> >> > >>> >> >> > % cat bad.md >>> >> >> > --- >>> >> >> > history: >>> >> >> > - number: Release 1.2 >>> >> >> > changes: | >>> >> >> > - TBD >>> >> >> > --- >>> >> >> > >>> >> >> > This fixes it: >>> >> >> > >>> >> >> > % diff bad.md good.md >>> >> >> > 5c5 >>> >> >> > < - TBD >>> >> >> > --- >>> >> >> >> - TBD >>> >> >> > >>> >> >> > The latest pandoc: >>> >> >> > >>> >> >> > % ~/Downloads/pandoc-2.14.0.1/bin/pandoc -v >>> >> >> > pandoc 2.14.0.1 >>> >> >> > ... >>> >> >> > >>> >> >> > Pandoc thinks the bad YAML is a table: >>> >> >> > >>> >> >> > % ~/Downloads/pandoc-2.14.0.1/bin/pandoc bad.md >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> >
history:
- number: Release 1.2
changes: |
- TBD
>>> >> >> > >>> >> >> > But it's OK with the good YAML: >>> >> >> > >>> >> >> > % ~/Downloads/pandoc-2.14.0.1/bin/pandoc good.md >>> >> >> > >>> >> >> > Parsing the file as YAML reports the error: >>> >> >> > >>> >> >> > % ~/Downloads/pandoc-2.14.0.1/bin/pandoc --metadata-file bad.md >>> >> >> > Error at "bad.md" (line 5, column 0): >>> >> >> > Unexpected ' ' >>> >> >> > >>> >> >> > % ~/Downloads/pandoc-2.14.0.1/bin/pandoc --metadata-file good.m= d >>> >> >> > ^C >>> >> >> > >>> >> >> > -- >>> >> >> > 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/CAEe_xxjF3Un2J-xg5UOs7= uReZ5cO27TATA%2BfDY%2BAtghAsVhShA%40mail.gmail.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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> >> To view this discussion on the web visit >>> >> >>> https://groups.google.com/d/msgid/pandoc-discuss/m2a6o8ul91.fsf%40johnm= acfarlane.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, sen= d >>> 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/CADAJKhC2g4z_H%2BK%2BV= tGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%40mail.gmail.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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxj-bHpfTLDhz5QRz51= x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com > > . > --=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/CADAJKhAr3Q_FR8FaubSDUxj692uSwAhKgdVV8mDRw5eU7HmO0g%40mail.g= mail.com. --000000000000849f3805c54798f0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It used to work.

Den m=C3=A5n 21 juni 2021 15:44William Lu= pton <wlupton@broadband-f= orum.org> skrev:
All,

I don'= t know how I missed this before, but I have noticed that this isn't tre= ated as a valid YAML block (at least not with pandoc 2.11.4).

% = cat comme= nt.md=C2=A0

---

# comment

...


<= /div>

% = pandoc co= mment.md=C2=A0

<hr />

<h1 id=3D"comment"= ;>comment</h1>

<p>=E2=80=A6</p>


Inserting some YAML works:

% = cat comme= nt-plus-variable.md=C2=A0

---

# comment

variable: 42

...


<= /div>

% = pandoc co= mment-plus-variable.md=C2=A0



I realise that this is an abuse, and that I could hav= e used an HTML comment (for example), but I believe that this is valid YAML= , so should it have worked?

% = yq eval c= omment.md



# comment



% = yq eval c= omment-plus-variable.md

# comment

variable: 42


Apologies if this behaviour h= as changed in the latest pandoc...

Thanks,
William

On Thu, 3 Jun 2021 at 09:10, William Lupton <wl= upton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> wrote:
Thanks!=C2=A0

On Thu, 3 Jun 20= 21 at 05:49, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:

These are good suggestions.=C2=A0 I've revised the manual accordingly.<= br>
BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Perhaps it should be pointed out that the body of YAML block scalars m= ust
> be indented relative to the line with the `|` or `>`. Not doing so = is
> indeed a YAML syntax error, so Pandoc does the right thing when not > considering it valid YAML, however unfortunate it is that Pandoc may t= hink
> it is something else.
>
> The overview of YAML syntax on Wikipedia is quite good. Perhaps the ma= nual
> could link to (some specific version of) it.
>
> https://en.m.wikipedia.org/wiki/YAML#Synt= ax
>
> Den ons 2 juni 2021 21:21John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> sk= rev:
>
>>
>> The problem is that basically anything is valid Markdown,
>> it's just a matter of how it is interpreted.=C2=A0 It does see= m
>> to me that in the second case we might want to at least emit
>> a warning -- if not downright fail.=C2=A0 It's just so unlikel= y
>> that someone would write a block beginning with `---`
>> and ending with `...` and intend it to be something other
>> than YAML metadata.=C2=A0 If you'd like, you could submit an >> issue for this.=C2=A0 I'd rather not suggest avoiding complex<= br> >> YAML blocks -- sometimes they're fine, if the syntax is
>> correct!
>>
>> William Lupton <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> wr= ites:
>>
>> > Thanks. Yes, I guess I realised it had something to do with a= mbiguous
>> > grammars, but I hadn't really considered that my input wa= s a valid table
>> > (mea culpa).
>> >
>> > So I thought aha! I'll change the terminating "---&q= uot; to "..." (in the hope
>> > of an error), but this of course gives the output shown below= .
>> >
>> > I wonder whether there could be a warning in the manual (or m= aybe there
>> is
>> > and I've missed it?) and/or perhaps a suggestion that it = might be a good
>> > idea to avoid complex YAML metadata blocks (in favour of meta= data files)?
>> > I'd be happy to create an issue and/or a MANUAL.md pull r= equest.
>> >
>> > % cat bad.md
>> > ---
>> > history:
>> > - number: Release 1.2
>> >=C2=A0 =C2=A0changes: |
>> >=C2=A0 =C2=A0- TBD
>> > ...
>> >
>> > % pandoc bad.md
>> > <hr />
>> > <p>history: - number: Release 1.2 changes: | - TBD =E2= =80=A6</p>
>> >
>> >
>> > On Wed, 2 Jun 2021 at 17:47, John MacFarlane <jgm@berkeley.e= du> wrote:
>> >
>> >>
>> >> Well, this actually IS a valid "simple table".= =C2=A0 So how is
>> >> pandoc to know that you intended it as a YAML metadata bl= ock?
>> >> Pandoc tries first to parse things as YAML blocks, and th= en as
>> >> tables, if either works, the parse succeeds with no error= .
>> >>
>> >> William Lupton <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> writes:
>> >>
>> >> > Should I expect syntax errors in YAML blocks to be d= etected and
>> reported?
>> >> >
>> >> > This has a syntax error in the YAML block:
>> >> >
>> >> > % cat bad.md
>> >> > ---
>> >> > history:
>> >> > - number: Release 1.2
>> >> >=C2=A0 =C2=A0changes: |
>> >> >=C2=A0 =C2=A0- TBD
>> >> > ---
>> >> >
>> >> > This fixes it:
>> >> >
>> >> > % diff bad.md good.md
>> >> > 5c5
>> >> > <=C2=A0 =C2=A0- TBD
>> >> > ---
>> >> >>=C2=A0 =C2=A0 =C2=A0- TBD
>> >> >
>> >> > The latest pandoc:
>> >> >
>> >> > % ~/Downloads/pandoc-2.14.0.1/bin/pandoc -v
>> >> > pandoc 2.14.0.1
>> >> > ...
>> >> >
>> >> > Pandoc thinks the bad YAML is a table:
>> >> >
>> >> > % ~/Downloads/pandoc-2.14.0.1/bin/pandoc bad.md
>> >> > <table>
>> >> > <tbody>
>> >> > <tr class=3D"odd">
>> >> > <td>history:</td>
>> >> > </tr>
>> >> > <tr class=3D"even">
>> >> > <td>- number: Release 1.2</td>
>> >> > </tr>
>> >> > <tr class=3D"odd">
>> >> > <td>changes: |</td>
>> >> > </tr>
>> >> > <tr class=3D"even">
>> >> > <td>- TBD</td>
>> >> > </tr>
>> >> > </tbody>
>> >> > </table>
>> >> >
>> >> > But it's OK with the good YAML:
>> >> >
>> >> > % ~/Downloads/pandoc-2.14.0.1/bin/pandoc good.md
>> >> >
>> >> > Parsing the file as YAML reports the error:
>> >> >
>> >> > % ~/Downloads/pandoc-2.14.0.1/bin/pandoc --metadata-= file bad.md
>> >> > Error at "bad.md" (line 5, column 0):
>> >> > Unexpected ' '
>> >> >
>> >> > % ~/Downloads/pandoc-2.14.0.1/bin/pandoc --metadata-= file good.md
>> >> > ^C
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed= to the Google
>> >> Groups "pandoc-discuss" group.
>> >> > To unsubscribe from this group and stop receiving em= ails from it, send
>> >> an email to
pandoc-discuss+uns= ubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> >> > To view this discussion on the web visit
>> >>
>> https://groups.google.com/d/msgid/= pandoc-discuss/CAEe_xxjF3Un2J-xg5UOs7uReZ5cO27TATA%2BfDY%2BAtghAsVhShA%40ma= il.gmail.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-discuss+unsubscribe@goo= glegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/m2a6o8ul91.fsf%40johnm= acfarlane.net
>> .
>>
>
> --
> You received this message because you are subscribed to the Google Gro= ups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send= an email to pandoc-discuss+unsubscribe@googlegr= oups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhC2g4z_H%2BK%2BVt= GoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%40mail.gmail.com.

--
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 pandoc-discuss+unsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-dis= cuss/CAEe_xxj-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.c= om.

--
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/CADAJKhAr3Q_FR8FaubSDUxj692uSwAhKgdVV8mDR= w5eU7HmO0g%40mail.gmail.com.
--000000000000849f3805c54798f0--