public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Syntax errors in YAML blocks
@ 2021-06-02 13:42 William Lupton
       [not found] ` <CAEe_xxjF3Un2J-xg5UOs7uReZ5cO27TATA+fDY+AtghAsVhShA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: William Lupton @ 2021-06-02 13:42 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

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
<table>
<tbody>
<tr class="odd">
<td>history:</td>
</tr>
<tr class="even">
<td>- number: Release 1.2</td>
</tr>
<tr class="odd">
<td>changes: |</td>
</tr>
<tr class="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 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.

[-- Attachment #2: Type: text/html, Size: 2460 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found] ` <CAEe_xxjF3Un2J-xg5UOs7uReZ5cO27TATA+fDY+AtghAsVhShA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-06-02 16:46   ` John MacFarlane
       [not found]     ` <m2o8cousce.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: John MacFarlane @ 2021-06-02 16:46 UTC (permalink / raw)
  To: William Lupton, pandoc-discuss


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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
> <table>
> <tbody>
> <tr class="odd">
> <td>history:</td>
> </tr>
> <tr class="even">
> <td>- number: Release 1.2</td>
> </tr>
> <tr class="odd">
> <td>changes: |</td>
> </tr>
> <tr class="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 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.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found]     ` <m2o8cousce.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2021-06-02 17:09       ` William Lupton
       [not found]         ` <CAEe_xxiHXF5vQTwyoUVLErHXSb+iMQvUaodU3aPbjnJ=fT54dQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: William Lupton @ 2021-06-02 17:09 UTC (permalink / raw)
  To: John MacFarlane; +Cc: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 3352 bytes --]

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
<hr />
<p>history: - number: Release 1.2 changes: | - TBD …</p>


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 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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
> > <table>
> > <tbody>
> > <tr class="odd">
> > <td>history:</td>
> > </tr>
> > <tr class="even">
> > <td>- number: Release 1.2</td>
> > </tr>
> > <tr class="odd">
> > <td>changes: |</td>
> > </tr>
> > <tr class="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 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
> .
>

-- 
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_xxiHXF5vQTwyoUVLErHXSb%2BiMQvUaodU3aPbjnJ%3DfT54dQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 5145 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found]         ` <CAEe_xxiHXF5vQTwyoUVLErHXSb+iMQvUaodU3aPbjnJ=fT54dQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-06-02 19:20           ` John MacFarlane
       [not found]             ` <m2a6o8ul91.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: John MacFarlane @ 2021-06-02 19:20 UTC (permalink / raw)
  To: William Lupton; +Cc: pandoc-discuss


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 <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 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
> <hr />
> <p>history: - number: Release 1.2 changes: | - TBD …</p>
>
>
> 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 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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
>> > <table>
>> > <tbody>
>> > <tr class="odd">
>> > <td>history:</td>
>> > </tr>
>> > <tr class="even">
>> > <td>- number: Release 1.2</td>
>> > </tr>
>> > <tr class="odd">
>> > <td>changes: |</td>
>> > </tr>
>> > <tr class="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 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
>> .
>>

-- 
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%40johnmacfarlane.net.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found]             ` <m2a6o8ul91.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2021-06-02 19:52               ` BPJ
       [not found]                 ` <CADAJKhC2g4z_H+K+VtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: BPJ @ 2021-06-02 19:52 UTC (permalink / raw)
  To: pandoc-discuss; +Cc: William Lupton

[-- Attachment #1: Type: text/plain, Size: 5345 bytes --]

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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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 <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 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
> > <hr />
> > <p>history: - number: Release 1.2 changes: | - TBD …</p>
> >
> >
> > 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 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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
> >> > <table>
> >> > <tbody>
> >> > <tr class="odd">
> >> > <td>history:</td>
> >> > </tr>
> >> > <tr class="even">
> >> > <td>- number: Release 1.2</td>
> >> > </tr>
> >> > <tr class="odd">
> >> > <td>changes: |</td>
> >> > </tr>
> >> > <tr class="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 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
> >> .
> >>
>
> --
> 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%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-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%2BVtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 8260 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found]                 ` <CADAJKhC2g4z_H+K+VtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-06-03  4:49                   ` John MacFarlane
       [not found]                     ` <m21r9jv9gv.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: John MacFarlane @ 2021-06-03  4:49 UTC (permalink / raw)
  To: BPJ, pandoc-discuss; +Cc: William Lupton


These are good suggestions.  I've revised the manual accordingly.

BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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 <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 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
>> > <hr />
>> > <p>history: - number: Release 1.2 changes: | - TBD …</p>
>> >
>> >
>> > 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 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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
>> >> > <table>
>> >> > <tbody>
>> >> > <tr class="odd">
>> >> > <td>history:</td>
>> >> > </tr>
>> >> > <tr class="even">
>> >> > <td>- number: Release 1.2</td>
>> >> > </tr>
>> >> > <tr class="odd">
>> >> > <td>changes: |</td>
>> >> > </tr>
>> >> > <tr class="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 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
>> >> .
>> >>
>>
>> --
>> 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%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-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%2BVtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%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/m21r9jv9gv.fsf%40johnmacfarlane.net.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found]                     ` <m21r9jv9gv.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2021-06-03  8:10                       ` William Lupton
       [not found]                         ` <CAEe_xxgTz6jLbWSK1t6Ln_xgr=LDk9XUDbomQH6nWvvTRQVC3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: William Lupton @ 2021-06-03  8:10 UTC (permalink / raw)
  To: John MacFarlane; +Cc: BPJ, pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 6541 bytes --]

Thanks!

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

>
> These are good suggestions.  I've revised the manual accordingly.
>
> BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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 <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 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
> >> > <hr />
> >> > <p>history: - number: Release 1.2 changes: | - TBD …</p>
> >> >
> >> >
> >> > 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 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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
> >> >> > <table>
> >> >> > <tbody>
> >> >> > <tr class="odd">
> >> >> > <td>history:</td>
> >> >> > </tr>
> >> >> > <tr class="even">
> >> >> > <td>- number: Release 1.2</td>
> >> >> > </tr>
> >> >> > <tr class="odd">
> >> >> > <td>changes: |</td>
> >> >> > </tr>
> >> >> > <tr class="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 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
> >> >> .
> >> >>
> >>
> >> --
> >> 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%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-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%2BVtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%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_xxgTz6jLbWSK1t6Ln_xgr%3DLDk9XUDbomQH6nWvvTRQVC3g%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 10446 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found]                         ` <CAEe_xxgTz6jLbWSK1t6Ln_xgr=LDk9XUDbomQH6nWvvTRQVC3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-06-21 13:43                           ` William Lupton
       [not found]                             ` <CAEe_xxj-bHpfTLDhz5QRz51x-zcs+VW5dgWbmRTRaNL+x6Y31Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: William Lupton @ 2021-06-21 13:43 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 7640 bytes --]

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

<hr />

<h1 id="comment">comment</h1>

<p>…</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 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>
>>
>> These are good suggestions.  I've revised the manual accordingly.
>>
>> BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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 <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 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
>> >> > <hr />
>> >> > <p>history: - number: Release 1.2 changes: | - TBD …</p>
>> >> >
>> >> >
>> >> > 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 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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
>> >> >> > <table>
>> >> >> > <tbody>
>> >> >> > <tr class="odd">
>> >> >> > <td>history:</td>
>> >> >> > </tr>
>> >> >> > <tr class="even">
>> >> >> > <td>- number: Release 1.2</td>
>> >> >> > </tr>
>> >> >> > <tr class="odd">
>> >> >> > <td>changes: |</td>
>> >> >> > </tr>
>> >> >> > <tr class="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 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
>> >> >> .
>> >> >>
>> >>
>> >> --
>> >> 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%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-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%2BVtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%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-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 20478 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found]                             ` <CAEe_xxj-bHpfTLDhz5QRz51x-zcs+VW5dgWbmRTRaNL+x6Y31Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-06-21 14:36                               ` BPJ
       [not found]                                 ` <CADAJKhAr3Q_FR8FaubSDUxj692uSwAhKgdVV8mDRw5eU7HmO0g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: BPJ @ 2021-06-21 14:36 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 8662 bytes --]

It used to work.

Den mån 21 juni 2021 15:44William Lupton <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org>
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
>
> <hr />
>
> <h1 id="comment">comment</h1>
>
> <p>…</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 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>>
>>>
>>> These are good suggestions.  I've revised the manual accordingly.
>>>
>>> BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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 <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 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
>>> >> > <hr />
>>> >> > <p>history: - number: Release 1.2 changes: | - TBD …</p>
>>> >> >
>>> >> >
>>> >> > 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 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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
>>> >> >> > <table>
>>> >> >> > <tbody>
>>> >> >> > <tr class="odd">
>>> >> >> > <td>history:</td>
>>> >> >> > </tr>
>>> >> >> > <tr class="even">
>>> >> >> > <td>- number: Release 1.2</td>
>>> >> >> > </tr>
>>> >> >> > <tr class="odd">
>>> >> >> > <td>changes: |</td>
>>> >> >> > </tr>
>>> >> >> > <tr class="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 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
>>> >> >> .
>>> >> >>
>>> >>
>>> >> --
>>> >> 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%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-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%2BVtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%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-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxj-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADAJKhAr3Q_FR8FaubSDUxj692uSwAhKgdVV8mDRw5eU7HmO0g%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 20805 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found]                                 ` <CADAJKhAr3Q_FR8FaubSDUxj692uSwAhKgdVV8mDRw5eU7HmO0g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-06-21 22:00                                   ` John MacFarlane
       [not found]                                     ` <m27dimg9nv.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: John MacFarlane @ 2021-06-21 22:00 UTC (permalink / raw)
  To: BPJ, pandoc-discuss


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 <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> writes:

> It used to work.
>
> Den mån 21 juni 2021 15:44William Lupton <wlupton-QSt+ys/nuMyEUIsrzH9SisXa4x6EXUF0@public.gmane.orgg>
> 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
>>
>> <hr />
>>
>> <h1 id="comment">comment</h1>
>>
>> <p>…</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 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>>>
>>>>
>>>> These are good suggestions.  I've revised the manual accordingly.
>>>>
>>>> BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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 <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 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
>>>> >> > <hr />
>>>> >> > <p>history: - number: Release 1.2 changes: | - TBD …</p>
>>>> >> >
>>>> >> >
>>>> >> > 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 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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
>>>> >> >> > <table>
>>>> >> >> > <tbody>
>>>> >> >> > <tr class="odd">
>>>> >> >> > <td>history:</td>
>>>> >> >> > </tr>
>>>> >> >> > <tr class="even">
>>>> >> >> > <td>- number: Release 1.2</td>
>>>> >> >> > </tr>
>>>> >> >> > <tr class="odd">
>>>> >> >> > <td>changes: |</td>
>>>> >> >> > </tr>
>>>> >> >> > <tr class="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 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
>>>> >> >> .
>>>> >> >>
>>>> >>
>>>> >> --
>>>> >> 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%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-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%2BVtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%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-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxj-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
> -- 
> 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/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-/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-Air.hsd1.ca.comcast.net.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found]                                     ` <m27dimg9nv.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
@ 2021-06-22  9:26                                       ` William Lupton
       [not found]                                         ` <CAEe_xxh-geLJmwn4cuYftHAVzA6UZKq9wUkE7s5hPvsUw88=Ew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: William Lupton @ 2021-06-22  9:26 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 10748 bytes --]

Thanks. https://github.com/jgm/pandoc/issues/7400

On Mon, 21 Jun 2021 at 23:01, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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 <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> writes:
>
> > It used to work.
> >
> > Den mån 21 juni 2021 15:44William Lupton <wlupton@broadband-forum.org>
> > 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
> >>
> >> <hr />
> >>
> >> <h1 id="comment">comment</h1>
> >>
> >> <p>…</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 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
> >>>
> >>>>
> >>>> These are good suggestions.  I've revised the manual accordingly.
> >>>>
> >>>> BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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 <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 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
> >>>> >> > <hr />
> >>>> >> > <p>history: - number: Release 1.2 changes: | - TBD …</p>
> >>>> >> >
> >>>> >> >
> >>>> >> > 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 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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
> >>>> >> >> > <table>
> >>>> >> >> > <tbody>
> >>>> >> >> > <tr class="odd">
> >>>> >> >> > <td>history:</td>
> >>>> >> >> > </tr>
> >>>> >> >> > <tr class="even">
> >>>> >> >> > <td>- number: Release 1.2</td>
> >>>> >> >> > </tr>
> >>>> >> >> > <tr class="odd">
> >>>> >> >> > <td>changes: |</td>
> >>>> >> >> > </tr>
> >>>> >> >> > <tr class="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 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
> >>>> >> >> .
> >>>> >> >>
> >>>> >>
> >>>> >> --
> >>>> >> 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%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-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%2BVtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%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-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com
> >> <
> https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxj-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com?utm_medium=email&utm_source=footer
> >
> >> .
> >>
> >
> > --
> > 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/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-/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-Air.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-geLJmwn4cuYftHAVzA6UZKq9wUkE7s5hPvsUw88%3DEw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 18992 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found]                                         ` <CAEe_xxh-geLJmwn4cuYftHAVzA6UZKq9wUkE7s5hPvsUw88=Ew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-06-22 16:56                                           ` John MacFarlane
       [not found]                                             ` <m27dilon28.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: John MacFarlane @ 2021-06-22 16:56 UTC (permalink / raw)
  To: William Lupton, pandoc-discuss

Fixed!

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

> Thanks. https://github.com/jgm/pandoc/issues/7400
>
> On Mon, 21 Jun 2021 at 23:01, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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 <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> writes:
>>
>> > It used to work.
>> >
>> > Den mån 21 juni 2021 15:44William Lupton <wlupton@broadband-forum.org>
>> > 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
>> >>
>> >> <hr />
>> >>
>> >> <h1 id="comment">comment</h1>
>> >>
>> >> <p>…</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 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>> >>>
>> >>>>
>> >>>> These are good suggestions.  I've revised the manual accordingly.
>> >>>>
>> >>>> BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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 <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 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
>> >>>> >> > <hr />
>> >>>> >> > <p>history: - number: Release 1.2 changes: | - TBD …</p>
>> >>>> >> >
>> >>>> >> >
>> >>>> >> > 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 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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
>> >>>> >> >> > <table>
>> >>>> >> >> > <tbody>
>> >>>> >> >> > <tr class="odd">
>> >>>> >> >> > <td>history:</td>
>> >>>> >> >> > </tr>
>> >>>> >> >> > <tr class="even">
>> >>>> >> >> > <td>- number: Release 1.2</td>
>> >>>> >> >> > </tr>
>> >>>> >> >> > <tr class="odd">
>> >>>> >> >> > <td>changes: |</td>
>> >>>> >> >> > </tr>
>> >>>> >> >> > <tr class="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 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
>> >>>> >> >> .
>> >>>> >> >>
>> >>>> >>
>> >>>> >> --
>> >>>> >> 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%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-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%2BVtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%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-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com
>> >> <
>> https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxj-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com?utm_medium=email&utm_source=footer
>> >
>> >> .
>> >>
>> >
>> > --
>> > 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/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-/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-Air.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-geLJmwn4cuYftHAVzA6UZKq9wUkE7s5hPvsUw88%3DEw%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/m27dilon28.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Syntax errors in YAML blocks
       [not found]                                             ` <m27dilon28.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
@ 2021-06-22 17:03                                               ` William Lupton
  0 siblings, 0 replies; 13+ messages in thread
From: William Lupton @ 2021-06-22 17:03 UTC (permalink / raw)
  To: John MacFarlane; +Cc: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 12440 bytes --]

Thanks very much.

On Tue, 22 Jun 2021 at 17:56, John MacFarlane <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
> >
> > On Mon, 21 Jun 2021 at 23:01, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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 <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> writes:
> >>
> >> > It used to work.
> >> >
> >> > Den mån 21 juni 2021 15:44William Lupton <wlupton@broadband-forum.org
> >
> >> > 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
> >> >>
> >> >> <hr />
> >> >>
> >> >> <h1 id="comment">comment</h1>
> >> >>
> >> >> <p>…</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 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
> wrote:
> >> >>>
> >> >>>>
> >> >>>> These are good suggestions.  I've revised the manual accordingly.
> >> >>>>
> >> >>>> BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
> 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 <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 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
> >> >>>> >> > <hr />
> >> >>>> >> > <p>history: - number: Release 1.2 changes: | - TBD …</p>
> >> >>>> >> >
> >> >>>> >> >
> >> >>>> >> > 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 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 <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 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
> >> >>>> >> >> > <table>
> >> >>>> >> >> > <tbody>
> >> >>>> >> >> > <tr class="odd">
> >> >>>> >> >> > <td>history:</td>
> >> >>>> >> >> > </tr>
> >> >>>> >> >> > <tr class="even">
> >> >>>> >> >> > <td>- number: Release 1.2</td>
> >> >>>> >> >> > </tr>
> >> >>>> >> >> > <tr class="odd">
> >> >>>> >> >> > <td>changes: |</td>
> >> >>>> >> >> > </tr>
> >> >>>> >> >> > <tr class="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 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
> >> >>>> >> >> .
> >> >>>> >> >>
> >> >>>> >>
> >> >>>> >> --
> >> >>>> >> 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%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-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%2BVtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw%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-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com
> >> >> <
> >>
> https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxj-bHpfTLDhz5QRz51x-zcs%2BVW5dgWbmRTRaNL%2Bx6Y31Q%40mail.gmail.com?utm_medium=email&utm_source=footer
> >> >
> >> >> .
> >> >>
> >> >
> >> > --
> >> > 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/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-/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-Air.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-geLJmwn4cuYftHAVzA6UZKq9wUkE7s5hPvsUw88%3DEw%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_xxgZiXmoX9dM8GV0MhMyAp6E-Sk99p%2BjdF22SNn8wU4JEA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 22954 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-06-22 17:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 13:42 Syntax errors in YAML blocks William Lupton
     [not found] ` <CAEe_xxjF3Un2J-xg5UOs7uReZ5cO27TATA+fDY+AtghAsVhShA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-02 16:46   ` John MacFarlane
     [not found]     ` <m2o8cousce.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2021-06-02 17:09       ` William Lupton
     [not found]         ` <CAEe_xxiHXF5vQTwyoUVLErHXSb+iMQvUaodU3aPbjnJ=fT54dQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-02 19:20           ` John MacFarlane
     [not found]             ` <m2a6o8ul91.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2021-06-02 19:52               ` BPJ
     [not found]                 ` <CADAJKhC2g4z_H+K+VtGoVd1T2nmYeMuRrnUquhDPpoYfuxSwWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-03  4:49                   ` John MacFarlane
     [not found]                     ` <m21r9jv9gv.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2021-06-03  8:10                       ` William Lupton
     [not found]                         ` <CAEe_xxgTz6jLbWSK1t6Ln_xgr=LDk9XUDbomQH6nWvvTRQVC3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-21 13:43                           ` William Lupton
     [not found]                             ` <CAEe_xxj-bHpfTLDhz5QRz51x-zcs+VW5dgWbmRTRaNL+x6Y31Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-21 14:36                               ` BPJ
     [not found]                                 ` <CADAJKhAr3Q_FR8FaubSDUxj692uSwAhKgdVV8mDRw5eU7HmO0g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-21 22:00                                   ` John MacFarlane
     [not found]                                     ` <m27dimg9nv.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
2021-06-22  9:26                                       ` William Lupton
     [not found]                                         ` <CAEe_xxh-geLJmwn4cuYftHAVzA6UZKq9wUkE7s5hPvsUw88=Ew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-22 16:56                                           ` John MacFarlane
     [not found]                                             ` <m27dilon28.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2021-06-22 17:03                                               ` William Lupton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).