From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28675 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: William Lupton Newsgroups: gmane.text.pandoc Subject: Re: Syntax errors in YAML blocks Date: Tue, 22 Jun 2021 18:03:11 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007bb2dc05c55dc49d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26022"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pandoc-discuss To: John MacFarlane Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBBXFPZCDAMGQEXH66MHA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jun 22 19:03:27 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f62.google.com ([209.85.167.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lvjo7-0006b9-6Y for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 22 Jun 2021 19:03:27 +0200 Original-Received: by mail-lf1-f62.google.com with SMTP id bt32-20020a0565122620b029030e2ef98a19sf7411526lfb.22 for ; Tue, 22 Jun 2021 10:03:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1624381406; cv=pass; d=google.com; s=arc-20160816; b=KM9R3TiuAFldo3ZKjyiOi37sSJx2dvOvNpzygzJrhR8q6waKv7riNsxmKlRaPOrTCw gUpUApX/QqV+V5IWy+V4Q1AkR5M9sfpBQDu10qG51nmAYcL6DFuT2cB2NmO/p3SRpNJ6 AyCu39LsJxlNLt6txEJqCuin/U25cx91yFgFXMBmkRwo+iMZdk6brt8Q67IkukQEZ2c8 RBg3meIHJ4o/RHFa17z8EMooZuuvK1xoEDUZSS3CssquhjlafcRVJkMG2ggg6RN2umZH OkVG0p/EwDNyzxoyaZISTWUld+xIKJGUp/QhgyX6o3j9yYbNElPVQ4gu/Dw84YwG3zUf nWMg== 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:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:sender:dkim-signature; bh=tQkYvIFeCc7Gl1tIedbPoWAjk7n9kHBqudnTiisCvP4=; b=rpNNKgQeGnfiT/DpsBo2OcYwC78tGIAU9TBvgT5ExibpFbGwp/vZqycGrVupKbeFZ2 ZlmPgHl3YAAw997V4NW0355VnFC7SIoCGcZ7LXPbU+NEM09vUr4OAfnltnfd1CcPLxR9 9WzAEBvG3G3HNt1dQD3CNDf9rgTxSlD+ZYadyrIjWupjyG23Zqp+rshi8J/VbQ5edJZO cyqGHXurEGHI3W1npu6mENCID3rD+gZOyXWJ3T0tp6VQ9AsrIhEPxvshW3+IaA60ah6o MVcSgE9qYXN37RUQJJ9fcmtldP9diKNSnW93J4mDGvkKoBDV5CYyxcFEQXYJOnAmH4si m5/g== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20150623.gappssmtp.com header.s=20150623 header.b=rsycI4yv; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::62e as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@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:from:date:message-id :subject:to:cc:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=tQkYvIFeCc7Gl1tIedbPoWAjk7n9kHBqudnTiisCvP4=; b=rx3v9C9BT8bwJMBKIOiw0fMwR6j4TvADOjlHJ3nmieW+BVjy8+SuD12HeCUk02sEnP iVx8S1KI1N/KCvATm3yeHJO/8ymWYiX7EVlLj5ACJOmFx3EPldmLH+LKnIQIJ5W09vrC 4je+0ylSCqtNKuVL8RV1rLxar6AqHw74VnjAJtHnBbGAkiLyYHS+3g58wFQnax3wD70M l9afS/b34XsHWK3gZj7SCOwD6pQql2XUOQMnXOKcTusnRCqcklBp3n4BaMGL2aVfjqXt hf9VukaonF7j8nZAH+ERedfTN9xRNSWJBR45TRVuiZS7BL8xsf0LszoEf2jYHxH8xzwy 6PEw== 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:from :date:message-id:subject:to:cc:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=tQkYvIFeCc7Gl1tIedbPoWAjk7n9kHBqudnTiisCvP4=; b=s1lNqmHV33hsZnVl0NPGIq+00lBa5554qt8eu4PxRVmCpigIzqqmgoaENNM8ez819J UErvZH6D4fUYuRNiEXFU5bx0Is2oZKL0GCyIpoz74EBHo6is5A3BsFj3PQ2NJvLYXMY0 S9BLV5KUVmahZJ/T97szE6IsLmXSqD3RfgIRlelNtuPOdDRwU6gMoBoVEqdXKpNeLKMR HdqtQSqF0/HiH/3phmBbsydVNlsu+s02m+X/ENgQLj95VxnWD3ZbT1ptNqTcBBck37uM N3WKhAe8V5KY04LDb+hWLIoxVDzoGsmuGDuOoeKHBYIsL4oEQXUxEIl9jLPAn8CsWGxa 5YIg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5304yAwcIeu4V28UoCYGiu76W0Q8Zt1VZbPzpGcQdkAsxJfaAcUh 5Upxuv8bkkcL6KV7NRqwri8= X-Google-Smtp-Source: ABdhPJzcCrcY0XdwT3c679ee1spd6EZAl8nyhiZKawrwo/FFrT0EKCnx5R5kuP7kykSBu7ET4TlBIg== X-Received: by 2002:a2e:914d:: with SMTP id q13mr4176432ljg.179.1624381406147; Tue, 22 Jun 2021 10:03:26 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:8913:: with SMTP id d19ls3477611lji.8.gmail; Tue, 22 Jun 2021 10:03:23 -0700 (PDT) X-Received: by 2002:a2e:80d1:: with SMTP id r17mr3832106ljg.223.1624381403274; Tue, 22 Jun 2021 10:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624381403; cv=none; d=google.com; s=arc-20160816; b=U8OPSCpXKbp3zOaYL3GA7e0QGafYUq7uPqMSBe46hWN0CQG4pUv5LmDao8x0NI3jDV mJwsV/NSNkmOnQTE3msLaRJHrhOxm403Y8fa5koTmRBK62wemH1VaeEHcLQdUYHKfjcj SYxWTYBjH00WOnEFcMjmiJ/8DW9NAqFHrEIFbVbKS0qc0cj97UQ8XS14UUGuRsACsART ZSKyUnUZAOdLzItFmPwEzmayZtj0OK+NtIIAfslbRamtW4x8ZEpkv5VW92naQTuYcTdT jrQkp3aejccEkUAdNHjMcIfei/DM8s5PFZeoe3gGhja1VnfXMX19X/PioK2CpkDCf6na dzVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=YfA8ofdoGsGLjSysYtLHxPppxeghGpfz1aDYvt3+G6w=; b=0n2PRhK6oDWddWQ2cdQENBcrpj+jd1c8U8Cue3lY2xgm3sqBgS1835Ck3kNHfXGKJI OZEvFnLue84yrUEhOLRKr45byR4hWB3nGBc4aLMZ69XdGhwyI35aVke/6G1/aYs2ZxC4 5ZSuxUeqxYLjQG6ItxmsjT6vSjbP39jA9bIcQR8MeqgFuv9QhqbHGHZIrJ3qvn39mC84 WtNpWwqvDfpriCr8gRxhCbaiVdyvSpHLE/cT8iUQx1De1qjTJ/fvP2f9vJtfMnFAAZ5h W1AL/O2i3hsiZrwHLk4L/uEcbmo6hjq5CqhvPMvAFhGYOGPm4VsX+rLaU+03shbD7u0P qphw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20150623.gappssmtp.com header.s=20150623 header.b=rsycI4yv; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::62e as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org Original-Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com. [2a00:1450:4864:20::62e]) by gmr-mx.google.com with ESMTPS id x10si104894ljp.5.2021.06.22.10.03.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Jun 2021 10:03:23 -0700 (PDT) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::62e as permitted sender) client-ip=2a00:1450:4864:20::62e; Original-Received: by mail-ej1-x62e.google.com with SMTP id l1so35674074ejb.6 for ; Tue, 22 Jun 2021 10:03:23 -0700 (PDT) X-Received: by 2002:a17:907:1011:: with SMTP id ox17mr4951332ejb.149.1624381402616; Tue, 22 Jun 2021 10:03:22 -0700 (PDT) In-Reply-To: X-Original-Sender: wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20150623.gappssmtp.com header.s=20150623 header.b=rsycI4yv; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::62e as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@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:28675 Archived-At: --0000000000007bb2dc05c55dc49d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks very much. On Tue, 22 Jun 2021 at 17:56, John MacFarlane wrote: > Fixed! > > William Lupton writes: > > > Thanks. https://github.com/jgm/pandoc/issues/7400 > > > > On Mon, 21 Jun 2021 at 23:01, John MacFarlane wrote: > > > >> > >> Yes, this definitely used to work. Maybe due to the change to > >> HsYAML? I will look into it, but an issue on the tracker will > >> help ensure it doesn't get forgotten. > >> > >> BPJ writes: > >> > >> > 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 > >> it > >> >> 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 < > >> wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> > >> >> 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 Pando= c > 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 belo= w. > >> >>>> >> > > >> >>>> >> > 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 mig= ht > >> 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 < > jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> > >> >>>> wrote: > >> >>>> >> > > >> >>>> >> >> > >> >>>> >> >> Well, this actually IS a valid "simple table". So how is > >> >>>> >> >> pandoc to know that you intended it as a YAML metadata bloc= k? > >> >>>> >> >> 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 detect= ed > >> 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.md > >> >>>> >> >> > ^C > >> >>>> >> >> > > >> >>>> >> >> > -- > >> >>>> >> >> > You received this message because you are subscribed to t= he > >> >>>> 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-xg5UOs7uR= eZ5cO27TATA%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%40johnmac= farlane.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 i= t, > >> 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/CADAJKhC2g4z_H%2BK%2BVtG= oVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%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 > >> >> < > >> > https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxj-bHpfTLDhz5QRz51= x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com?utm_medium=3Demail&utm_sou= rce=3Dfooter > >> > > >> >> . > >> >> > >> > > >> > -- > >> > 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, se= nd > >> 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/CADAJKhAr3Q_FR8FaubSDUxj= 692uSwAhKgdVV8mDRw5eU7HmO0g%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/m27dimg9nv.fsf%40Johns-A= ir.hsd1.ca.comcast.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-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_xxh-geLJmwn4cuYftHA= VzA6UZKq9wUkE7s5hPvsUw88%3DEw%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/CAEe_xxgZiXmoX9dM8GV0MhMyAp6E-Sk99p%2BjdF22SNn8wU4JEA%40mail= .gmail.com. --0000000000007bb2dc05c55dc49d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks very much.

On Tue, 22 Jun 2021 at 17:56, John MacFar= lane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote= :
Fixed!

William Lupton <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> writes:

> Thanks. https://github.com/jgm/pandoc/issues/7400<= br> >
> On Mon, 21 Jun 2021 at 23:01, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>
>>
>> Yes, this definitely used to work.=C2=A0 Maybe due to the change t= o
>> HsYAML? I will look into it, but an issue on the tracker will
>> help ensure it doesn't get forgotten.
>>
>> BPJ <bpj@me= lroch.se> writes:
>>
>> > It used to work.
>> >
>> > Den m=C3=A5n 21 juni 2021 15:44William Lupton <wlupton@broadband-for= um.org>
>> > skrev:
>> >
>> >> All,
>> >>
>> >> I don't know how I missed this before, but I have not= iced 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
>> >>
>> >> <hr />
>> >>
>> >> <h1 id=3D"comment">comment</h1>
>> >>
>> >> <p>=E2=80=A6</p>
>> >>
>> >> 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 us= ed an HTML
>> >> comment (for example), but I believe that this is valid Y= AML, so should
>> it
>> >> 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 pan= doc...
>> >>
>> >> Thanks,
>> >> William
>> >>
>> >> On Thu, 3 Jun 2021 at 09:10, William Lupton <
>> w= lupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org>
>> >> wrote:
>> >>
>> >>> Thanks!
>> >>>
>> >>> On Thu, 3 Jun 2021 at 05:49, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> = wrote:
>> >>>
>> >>>>
>> >>>> These are good suggestions.=C2=A0 I've revise= d the manual accordingly.
>> >>>>
>> >>>> BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>> >>>>
>> >>>> > Perhaps it should be pointed out that the bo= dy 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 t= he right thing when not
>> >>>> > considering it valid YAML, however unfortuna= te 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 <= ;jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org= > skrev:
>> >>>> >
>> >>>> >>
>> >>>> >> The problem is that basically anything i= s valid Markdown,
>> >>>> >> it's just a matter of how it is inte= rpreted.=C2=A0 It does seem
>> >>>> >> to me that in the second case we might w= ant to at least emit
>> >>>> >> a warning -- if not downright fail.=C2= =A0 It's just so unlikely
>> >>>> >> that someone would write a block beginni= ng with `---`
>> >>>> >> and ending with `...` and intend it to b= e something other
>> >>>> >> than YAML metadata.=C2=A0 If you'd l= ike, you could submit an
>> >>>> >> issue for this.=C2=A0 I'd rather not= suggest avoiding complex
>> >>>> >> YAML blocks -- sometimes they're fin= e, if the syntax is
>> >>>> >> correct!
>> >>>> >>
>> >>>> >> William Lupton <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org= > writes:
>> >>>> >>
>> >>>> >> > Thanks. Yes, I guess I realised it = had something to do with
>> >>>> ambiguous
>> >>>> >> > grammars, but I hadn't really c= onsidered that my input was a
>> valid
>> >>>> table
>> >>>> >> > (mea culpa).
>> >>>> >> >
>> >>>> >> > So I thought aha! I'll change t= he terminating "---" to "..." (in
>> >>>> the hope
>> >>>> >> > of an error), but this of course gi= ves the output shown below.
>> >>>> >> >
>> >>>> >> > I wonder whether there could be a w= arning in the manual (or maybe
>> >>>> there
>> >>>> >> is
>> >>>> >> > and I've missed it?) and/or per= haps 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
>> >>>> >> >=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 M= acFarlane <jgm@ber= keley.edu>
>> >>>> wrote:
>> >>>> >> >
>> >>>> >> >>
>> >>>> >> >> Well, this actually IS a valid = "simple table".=C2=A0 So how is
>> >>>> >> >> pandoc to know that you intende= d it as a YAML metadata block?
>> >>>> >> >> Pandoc tries first to parse thi= ngs as YAML blocks, and then as
>> >>>> >> >> tables, if either works, the pa= rse succeeds with no error.
>> >>>> >> >>
>> >>>> >> >> William Lupton <wlupton@broadband-foru= m.org> writes:
>> >>>> >> >>
>> >>>> >> >> > Should I expect syntax err= ors 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
>> >>>> >> >> >=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- T= BD
>> >>>> >> >> >
>> >>>> >> >> > 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&q= uot;>
>> >>>> >> >> > <td>history:</td&= gt;
>> >>>> >> >> > </tr>
>> >>>> >> >> > <tr class=3D"even&= quot;>
>> >>>> >> >> > <td>- number: Releas= e 1.2</td>
>> >>>> >> >> > </tr>
>> >>>> >> >> > <tr class=3D"odd&q= uot;>
>> >>>> >> >> > <td>changes: |</t= d>
>> >>>> >> >> > </tr>
>> >>>> >> >> > <tr class=3D"even&= quot;>
>> >>>> >> >> > <td>- TBD</td>=
>> >>>> >> >> > </tr>
>> >>>> >> >> > </tbody>
>> >>>> >> >> > </table>
>> >>>> >> >> >
>> >>>> >> >> > But it's OK with the g= ood YAML:
>> >>>> >> >> >
>> >>>> >> >> > % ~/Downloads/pandoc-2.14.= 0.1/bin/pandoc good.md
>> >>>> >> >> >
>> >>>> >> >> > Parsing the file as YAML r= eports 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&quo= t; group.
>> >>>> >> >> > To unsubscribe from this g= roup and stop receiving emails from
>> >>>> it, send
>> >>>> >> >> an email to pandoc-disc= uss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> >>>> >> >> > To view this discussion on= the web visit
>> >>>> >> >>
>> >>>> >>
>> >>>>
>> https://groups.google.com/d/msgid/pandoc-disc= uss/CAEe_xxjF3Un2J-xg5UOs7uReZ5cO27TATA%2BfDY%2BAtghAsVhShA%40mail.gmail.co= m
>> >>>> >> >> .
>> >>>> >> >>
>> >>>> >>
>> >>>> >> --
>> >>>> >> You received this message because you ar= e 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+unsubscr= ibe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> >>>> >> To view this discussion on the web visit=
>> >>>> >>
>> >>>>
>> https:/= /groups.google.com/d/msgid/pandoc-discuss/m2a6o8ul91.fsf%40johnmacfarlane.n= et
>> >>>> >> .
>> >>>> >>
>> >>>> >
>> >>>> > --
>> >>>> > You received this message because you are su= bscribed to the Google
>> >>>> Groups "pandoc-discuss" group.
>> >>>> > To unsubscribe from this group and stop rece= iving emails from it,
>> send
>> >>>> an email to pandoc-discuss+unsubscribe@go= oglegroups.com.
>> >>>> > To view this discussion on the web visit
>> >>>>
>> https://groups.google.com/d/msgid/pandoc-disc= uss/CADAJKhC2g4z_H%2BK%2BVtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%40mail.gmail.co= m
>> >>>> .
>> >>>>
>> >>> --
>> >> You received this message because you are subscribed to t= he Google
>> Groups
>> >> "pandoc-discuss" group.
>> >> To unsubscribe from this group and stop receiving emails = from it, send
>> an
>> >> email to pandoc-discuss+unsubscribe@googlegroups.= com.
>> >> To view this discussion on the web visit
>> >>
>> https://groups.google.com/d/msgid/pandoc-disc= uss/CAEe_xxj-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.co= m
>> >> <
>> ht= tps://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxj-bHpfTLDhz5QRz51x-zc= s%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com?utm_medium=3Demail&utm_sou= rce=3Dfooter
>> >
>> >> .
>> >>
>> >
>> > --
>> > 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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> > To view this discussion on the web visit
>>
https://groups.google.com/d/msgid/pandoc-discuss/= CADAJKhAr3Q_FR8FaubSDUxj692uSwAhKgdVV8mDRw5eU7HmO0g%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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.<= br> >> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/m27dimg9nv.fsf%40Johns= -Air.hsd1.ca.comcast.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit https://gr= oups.google.com/d/msgid/pandoc-discuss/CAEe_xxh-geLJmwn4cuYftHAVzA6UZKq9wUk= E7s5hPvsUw88%3DEw%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 pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://group= s.google.com/d/msgid/pandoc-discuss/CAEe_xxgZiXmoX9dM8GV0MhMyAp6E-Sk99p%2Bj= dF22SNn8wU4JEA%40mail.gmail.com.
--0000000000007bb2dc05c55dc49d--