* Each YAML block is a YAML document?
@ 2021-08-13 10:51 William Lupton
[not found] ` <CAEe_xxhdOH1XXJJ3gZBNz+80XZ6XG=h1W9K0qCk2mTModpd9Hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: William Lupton @ 2021-08-13 10:51 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]
I was trying to use YAML anchors to avoid some duplication. This works:
---
buttons-base:
- &home-button
label: Home
url: 'https://www.example.com'
buttons:
- *home-button
- label: Extra
url: 'https://extra.example.com'
...
but if I split it into two separate YAML blocks the second block isn't
parsed as YAML. (In the real world, I want the first definition, which
would define several YAML anchors, to be in a separate shared YAML file.)
I'm pretty sure that this is because each YAML block is (in YAML-speak) a
separate YAML document, so I should never have expected this to work. If
so, perhaps the manual could clarify this? However, just in case there's a
way of sharing some context between YAML blocks, I thought I'd mention it
here before creating a GH issue.
Thanks!
--
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_xxhdOH1XXJJ3gZBNz%2B80XZ6XG%3Dh1W9K0qCk2mTModpd9Hg%40mail.gmail.com.
[-- Attachment #2: Type: text/html, Size: 5364 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Each YAML block is a YAML document?
[not found] ` <CAEe_xxhdOH1XXJJ3gZBNz+80XZ6XG=h1W9K0qCk2mTModpd9Hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-08-13 14:45 ` John MacFarlane
0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2021-08-13 14:45 UTC (permalink / raw)
To: William Lupton, pandoc-discuss
Correct.
William Lupton <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> writes:
> I was trying to use YAML anchors to avoid some duplication. This works:
>
> ---
>
> buttons-base:
>
> - &home-button
>
> label: Home
>
> url: 'https://www.example.com'
>
>
> buttons:
>
> - *home-button
>
> - label: Extra
>
> url: 'https://extra.example.com'
>
> ...
>
> but if I split it into two separate YAML blocks the second block isn't
> parsed as YAML. (In the real world, I want the first definition, which
> would define several YAML anchors, to be in a separate shared YAML file.)
>
> I'm pretty sure that this is because each YAML block is (in YAML-speak) a
> separate YAML document, so I should never have expected this to work. If
> so, perhaps the manual could clarify this? However, just in case there's a
> way of sharing some context between YAML blocks, I thought I'd mention it
> here before creating a GH issue.
>
> Thanks!
>
> --
> 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_xxhdOH1XXJJ3gZBNz%2B80XZ6XG%3Dh1W9K0qCk2mTModpd9Hg%40mail.gmail.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-13 14:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 10:51 Each YAML block is a YAML document? William Lupton
[not found] ` <CAEe_xxhdOH1XXJJ3gZBNz+80XZ6XG=h1W9K0qCk2mTModpd9Hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-08-13 14:45 ` John MacFarlane
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).