From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28519 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: William Lupton Newsgroups: gmane.text.pandoc Subject: Syntax errors in YAML blocks Date: Wed, 2 Jun 2021 14:42:47 +0100 Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f3a82205c3c8a2e6" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39752"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBB3MV32CQMGQEZ4E3ZMQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jun 02 15:43:11 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ej1-f56.google.com ([209.85.218.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1loR9L-000AAQ-HO for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 02 Jun 2021 15:43:11 +0200 Original-Received: by mail-ej1-f56.google.com with SMTP id gs18-20020a1709072d12b02903f19777c38asf674359ejc.9 for ; Wed, 02 Jun 2021 06:43:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1622641391; cv=pass; d=google.com; s=arc-20160816; b=XnsjtAiC8krcgM9lFHrelgbQYiif9WnTk7em4Y5Fs4FUExoL63stu380PXB+uzP8nu mREeDOzH0MljU6gR0eZMmaiB3vIbYqiq1172WENAab+RntsdAez8a/TnT46DTxwgQjjb Agi+JR0a/vLPl5c7U+BrnFDP9Q2SKCW6nJux8Rl5fclSshxk2QjA3r4SX8EseSuGDKb4 Vfn+fxCy6VrjBT87XXT1PK+i0lfUfHLYt4zy2HTL86DpBlAUaVDOmGY2ZG2CSHCq77/T SkhF02NaJOUtMjCbsr1lPx9zcXvhskS2w8F3/SdVRMrVKo2YbNrue+MuY0tZdEHX98W5 G7fg== 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:to:subject:message-id:date :from:mime-version:sender:dkim-signature; bh=EmeuY+d6Cz4FB+eDPjvaFSqalteLwjgZSsnCwOAIC3Q=; b=IOBZrsYPBiSaNw0yPn/X0NNfb4JC6572/sxAIMEUUnyicnrLT8VBEFd0OgRxrHrAI+ JN5V7/2AGKiGwgZAkektqCS0kFAbwCKcqIh2a/akuPnzk5BY26uJmIhIyR6Fz1wJjtGh H51yA6GendMMO/8Xz3iwlBJxMntY46P6Yj+mMNHbvVma0J23T4ydd1v1FryKgMdfOKjy t1GsaXfcFDX93j3Sf3b6L47gU6C3qoxKwIDpSrwc3maaTxPYtEFsBIbmTYTqFFcuburd 8P69mzatPovVRxBJMtzKJT1qJGBWEqJtZvL6G6lAgXNNEJS8/mvI/OIYgWqfZ/2QqJTx RS/A== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20150623.gappssmtp.com header.s=20150623 header.b="qb/YaNBS"; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::635 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:from:date:message-id:subject:to :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=EmeuY+d6Cz4FB+eDPjvaFSqalteLwjgZSsnCwOAIC3Q=; b=p5/u55cLEKmEmH/X1jBvzDHGY6+rBvbs2d0gvyURDKjzclmYnMhvtkIqv0NWeZhvs/ ZbH+PY01gINAlZRmq3ngzoxglXxOrenqN74dsMU2SoPoDZ1x8abNBD9q6mbrfTw3jSF4 6an3jf0z+6Ej/IHC1Z2UPVlwEGM4gzUI9Hg4PZSCQElbJXUXAr5HZA30LspyYBn8/Zbm jwSLjt+aMri73ncL/AyC9ggYTmQrBuS8kWaGvlb5737dYar2X9NiWWdDqAeW5xzBVyZv Z+WUEhgqp8WeRY+1RaMtpDaeiZlnUEr7mBoV4YMRlzuwshcqVFuOMiR0d1g1PZ5fX5s8 1Oag== 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:from:date:message-id:subject :to: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=EmeuY+d6Cz4FB+eDPjvaFSqalteLwjgZSsnCwOAIC3Q=; b=tHsbExkLP4wbv2Jg+7g8ztP5tzgTeDcS/46SG5aST5EX6VkRE6HfD+W+seBPm38ih6 /l79UssFlaVrDlg+WI+TpWcCjenQdE/rkD2S0meX0lCl4PwZ5ldbIHeIgpMkHqR6I6e5 tFsFePTmvkJFmKuhSyqEn06ASMSySAovhHPPuvqcjkMM7htOCB4+9o6Q865IZ8vghG2M XVfG2E/xUt3QzNs9oIZrPEKVc/GQP/CnS2oYJ5uikbMu6qiwew+m9U8CcGMkmH7co1Wv nOq3khcmg6+59S1wwOd6Tb4h2oHhoa1PRE+dUZvIqeLezn/vXna2HrAuPLKB/9YYSjY9 dYYA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530YaNf3D9ijJj4jKl5CwwwW7orPhYdyDi+de8LC9RrsUbo1R/kf iQTBZEVWlJOrxpwHeilweUY= X-Google-Smtp-Source: ABdhPJyI9wNrLph7NO9wgXZDZ7gh6AiWjid82HTjdw4MiRGAaNvw563J3anlfYDaL7J7svOFfLkDiw== X-Received: by 2002:a17:906:7188:: with SMTP id h8mr17410872ejk.529.1622641391241; Wed, 02 Jun 2021 06:43:11 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:907:72d3:: with SMTP id du19ls282541ejc.10.gmail; Wed, 02 Jun 2021 06:42:58 -0700 (PDT) X-Received: by 2002:a17:906:16cb:: with SMTP id t11mr8095000ejd.112.1622641378946; Wed, 02 Jun 2021 06:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622641378; cv=none; d=google.com; s=arc-20160816; b=nx9XLvDlwOXFaeb2CHE+oeJiNufnRFDqbBPF3znIxlgLZdFRoW5jbyXr+JeZupWkSS aFC7Zf0VWhN+QY00dajo3TvRD/vByhP1nW3gmAcXD8PjUs2iQOTyJ4GKwaOOD1I1QdRG UAhK/GlSdIEtJCLu8SIKe7O6f3b38rez4579DDZzn4KsF0nqXCn6Hvyqy4L53gLwoTbF l85y29vuHRgPPT6Wvg/APu9GhXEOtOEa7VmpyJ/KPb1n+0PGCjyRVSWkruln80JS+58+ G4GhPdJ45rQrNRgjaEQIU3qtVwBqjymaG5vXPXAw6NGxVnWIy0qxn0PWQSIfKb8vDhtY /q1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=k5Q7jU0I0RbNlOmKuENbydbQ1oG6ahnP0EFdumqydww=; b=pINdlQj6fwe+evWpeZaqjKOzs8hvAmiDYKSLuNpTbUy3DH8lOMDsWPy3hQWyTt6j6C kcgGhZIrqiHSilSle8lbDqp/Z80JkmUe79JvFf8NsD0ZxR1fY7XeobM50cIkHzUIXNNl rDScSTuajJ1lc7SBlZ2OqKb5UCYmiMrBQ2ieWe9FXjUAw+YI+MA6E966DGmgGFI+Q5Gp o6zj1ZScd1jVO5ejqsjLVLdaw/1dYrcoCfYrkHXxgjqPRYpxjvPfgTxK1yn6YyW5M1UD Tv1KFvugZt2HfwGuZPluPpOsM4GWdUdkya9iqy2tyWJiwNGxHaff8bJ1pGVucqA7r13i EMvg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20150623.gappssmtp.com header.s=20150623 header.b="qb/YaNBS"; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::635 as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org Original-Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com. [2a00:1450:4864:20::635]) by gmr-mx.google.com with ESMTPS id m7si3100edq.5.2021.06.02.06.42.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Jun 2021 06:42:58 -0700 (PDT) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::635 as permitted sender) client-ip=2a00:1450:4864:20::635; Original-Received: by mail-ej1-x635.google.com with SMTP id e18so3938720eje.5 for ; Wed, 02 Jun 2021 06:42:58 -0700 (PDT) X-Received: by 2002:a17:906:e88:: with SMTP id p8mr18166209ejf.105.1622641378298; Wed, 02 Jun 2021 06:42:58 -0700 (PDT) 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="qb/YaNBS"; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::635 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:28519 Archived-At: --000000000000f3a82205c3c8a2e6 Content-Type: text/plain; charset="UTF-8" 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. --000000000000f3a82205c3c8a2e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Should I expect syntax errors in YAML blocks to be detecte= d and reported?

This has a syntax error in the YAML bloc= k:

% cat bad.md
---
= history:
- number: Release 1.2
=C2=A0 changes: |
=C2=A0 - TBD
-= --


This fixes it:

% diff bad.md good.md
5c5
< =C2=A0 - TBD
---=
> =C2=A0 =C2=A0 - TBD

The latest pan= doc:

% ~/Downloads/pandoc-2.14.0.1/b= in/pandoc -v
pandoc 2.14.0.1
...

Pandoc thin= ks 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&= quot;>
<td>changes: |</td>
</tr>
<tr class= =3D"even">
<td>- TBD</td>
</tr>
<= ;/tbody>
</table>

But it's OK with= the good YAML:

% ~/Downl= oads/pandoc-2.14.0.1/bin/pandoc good.md

Parsing the file as = YAML reports the error:

% ~/Download= s/pandoc-2.14.0.1/bin/pandoc --metadata-file bad.md
Error at "bad.m= d" (line 5, column 0):
Unexpected ' '

% ~/Downloads/pandoc-2.14.0.1/bin/pandoc --metadat= a-file good.md
^C

--
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://gro= ups.google.com/d/msgid/pandoc-discuss/CAEe_xxjF3Un2J-xg5UOs7uReZ5cO27TATA%2= BfDY%2BAtghAsVhShA%40mail.gmail.com.
--000000000000f3a82205c3c8a2e6--