From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28522 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Syntax errors in YAML blocks Date: Wed, 02 Jun 2021 10:46:57 -0600 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11266"; mail-complaints-to="usenet@ciao.gmane.io" To: William Lupton , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBDXM32CQMGQEG5ALW4Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jun 02 18:47:13 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f56.google.com ([209.85.210.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1loU1R-0002ej-6e for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 02 Jun 2021 18:47:13 +0200 Original-Received: by mail-ot1-f56.google.com with SMTP id i25-20020a9d4a990000b0290304f00e3e3asf1883482otf.15 for ; Wed, 02 Jun 2021 09:47:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1622652431; cv=pass; d=google.com; s=arc-20160816; b=0YTnz2CPqGnRHfGokrVTOnKWGx9rXh46tkREjAh6VUu9ApBMRPsjAT4pS1t4Yo3lFs tjz50hsJqp9Xt8796G5JZQ1gWAAbYiheH2nK2bYeK8CFP39UuX6GXKzmIC/9bm0/J87T Pf2c119a6dIC5tg3KJlkYHq3yfUHFz5LFcggcm8HTHgtUUrMUtzJg2YzKPUJ6TUcYsBw ehETzBj5ERPv0U3uaiyUrZLAYM1zGFwaOzty2j33sD/Xewrek4RbdQrWv+Ad+MB6tUp/ QR//5E+Cs/KrodrIEnct6sZP9D0kyTgumgX+X7B4KUTvltHcGuNRDMqLqhD9z+Z4NKVV auKA== 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:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=XEc5whzvNnXWU6KFu5xFLpucoA0HHA453cGrhDlUAlw=; b=wBTWZFwylXxA4Zfcbex1KwLEW3xgCtPU213F5v0RndPUb4Kdmcy6HA9ARNr0m32CC0 qZ1WkqkSpTG7knhB+0oiO0i/s9MoEbCi5VOoRvDeWysbNV9HkXF5SwPS9/16ZODU6csX qBkpjplTUbodW0LqbuTEDcnEcPb8LNIt9teTnJ304cNhCS9FAoUOze45fN6QS+sTuWr+ jrqcVEoxX0DfUOOVyXZ3ON3z7RNm/QNTU4qfHjsClKZzD7KAo82Y3qm/l8VfytRhc5Cb CpQHelgg5YiT0GT5pHMPoV6RO16eP70LUUH4U0cllFydoA40KvXFm8ajwguTiCeMqQK2 H9tQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b="1c/dJA50"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::436 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version: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=XEc5whzvNnXWU6KFu5xFLpucoA0HHA453cGrhDlUAlw=; b=fn3gWbwSpRl6UnETZkZXyCtjg5sxSWuX4LWZFCjhImUTa4Kqjwo4Vd76NMYUxWAJF3 mPdK5cd6xnPmIDmMKxV3Sha5Mu8a6MkG7ePq/I8DJuUTaiZLkxprY/QrznID5nJOC5IU MsJ9wtnGmAUzPBrlVPat0nlqfFr9QJZMzyR/Wm7PW6qyH2+9bWizUCRz64vH4U9szn5K Um9jABoqSP2TuV9SMFuBjWcCx/a0lpDK0IDpZQWIpcYA29JJBnJo4QHp7ZdRkZekjpNe MJ+Hxwz8fqY83cYW2THKpEQyT+uGBLi3UqtyJTCknDeUNJi7aqX+RgEJT8OHxwCh2p4R 9w/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version: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=XEc5whzvNnXWU6KFu5xFLpucoA0HHA453cGrhDlUAlw=; b=Kb8ejDL3TxYHpNCYwqis0rAevktDlM18p9fGtW/t0aZuh4cdihIUn72sJ29lnVkThS 24QKUrkzrWNkByWMH5uLhdg8jb0kA9GMAHrH6ifB+xZCer4XjJiMaLxXIJuGWrnvMWWb jYDcljVa5HUQ4pnOpbeyuo8mjVlb8j/kYwFZXqte01o5Og/FSh7X7t4gazwZ0TbK4KWO oVcugdHqjM3vo8RTt/uVhefV36hEgfIB/xWWWKoAr4s+9BfSvP9+xcM/T/fUBjoB+Anv cQTaSqaYTNZo1gqRulHqMlgR01QhgJqbDukkporHn9qNA70SRbjbWbqh5hMkwo+IO7gW LREg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531M6aXNnQe3zc5Kpzf5QmYjXf11RLpz2J3HsG8H0z6P9ZJ32GjY PVMBLy1cxcRX4HC6QBiVBTg= X-Google-Smtp-Source: ABdhPJxdwNDlVcA4LqupLhjDQajT/fkCGOnf0V3FUlLWAMvKH2ihrrYxujUJMUWEispGDc1aZDrOIg== X-Received: by 2002:a4a:d809:: with SMTP id f9mr18991023oov.71.1622652431692; Wed, 02 Jun 2021 09:47:11 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:2093:: with SMTP id y19ls125349otq.11.gmail; Wed, 02 Jun 2021 09:47:10 -0700 (PDT) X-Received: by 2002:a9d:30d2:: with SMTP id r18mr25941276otg.170.1622652429947; Wed, 02 Jun 2021 09:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622652429; cv=none; d=google.com; s=arc-20160816; b=gncR/NyEroujXxDzOstY3ewQkbHgQ3Pu6ee24Ps2wtvDtXjlDRi7/FN3q66dVWGxz+ xCsF/gxr733IFgYx7nH1NzK8ywU1M90ANAjsngWg6MN70h9LxDXcCZ8vLSQ9B9OEct8D IaiHOCQ0RyvFw/xO5gVVlYZij3jC3hz4g7thfRTQrQqroHVlqkyDoOGQBYRnuRqK2I3o PT6EQKoQYl5OmAOF1hut29wyiaPw2Tm9akl84k7xQM2NuJRNLySr+XmFxCprNi6GpPJz SX1IhkE3YBhrx6KRfmnPzsGaZ/KRHCPDpLNzTBf+FYNw5Ktblt5BFW1JDEc4qcnpRiup NQYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=1vackWaCU83GQILf9mThE4L6D1oXl2N3sN3IZa5XvTA=; b=pBoXLDvGzUF5FhtJ8Maph1k/QQH8+BkASjYGA6M176iQKDdaADBaE5BxIORiUI5FjL fYGiTQQBgzNMtpu3DzIZf8xtMAk4yUlkN81MQoUkmtPQkG6bVE97+Knb50tW7Dc5rbIy 422pf0/S27tncUxxiXd1As2wCEjRW3xrixrLj4Pb2kn9lc+8Wob6BSbib84jGd9XSg83 xwxwiZ3yYmxKhgbRGrNiQ0cY4oQpAJTWwgCQAlza2yEAIu4hlhP4yqRCjFoaB0CZoo+V 8EYABEns51xhXMC+rmVP3AxgEFUrQ0milI52AJIx84EVjA1e311CXgIce4EQD8Jijhqn pbkw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b="1c/dJA50"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::436 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com. [2607:f8b0:4864:20::436]) by gmr-mx.google.com with ESMTPS id a25si53342otp.1.2021.06.02.09.47.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Jun 2021 09:47:09 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::436 as permitted sender) client-ip=2607:f8b0:4864:20::436; Original-Received: by mail-pf1-x436.google.com with SMTP id u18so2621102pfk.11 for ; Wed, 02 Jun 2021 09:47:09 -0700 (PDT) X-Received: by 2002:a65:60da:: with SMTP id r26mr34784980pgv.133.1622652429204; Wed, 02 Jun 2021 09:47:09 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id s20sm114724pjn.23.2021.06.02.09.47.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 09:47:08 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id BA4EDA23E; Wed, 2 Jun 2021 12:46:57 -0400 (EDT) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b="1c/dJA50"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::436 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:28522 Archived-At: 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.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 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-xg5UOs7uReZ5cO27TATA%2BfDY%2BAtghAsVhShA%40mail.gmail.com.