public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Singleton block construct with attributes?
Date: Wed, 25 Aug 2021 18:37:56 +0200	[thread overview]
Message-ID: <CADAJKhD-nf_TwJ8ojdN2zDhAc+q-7svG713=2ZMDzeG4e9Edvg@mail.gmail.com> (raw)
In-Reply-To: <CADAJKhCHPhqJz_8b8EikbNoh_Ytyn5iPefS3cvkQA=tjD94nMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

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

Oops. Typo on the last if line!

Den ons 25 aug. 2021 18:33BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> When I need a marker like this I use a code span, like
>
>     `--pause`
>
> ``````lua
> -- Look for a paragraph
> function Para (para)
>   -- With only one child
>   if 1 == #para.content then
>     local child = para.content[1]
>     -- Which is a code span
>     if 'Code' == child.type then
>       -- Ignore it if it has a class .code, i.e. `--pause` is a marker, but
>       -- `--pause`{.code} is "actual" code.
>       if child.classes:includes('code') then
>         return nil
>       end
>       -- If it is the marker return some block content
>       if '--pauae' == child.text then
>         return whatever()
>       end
>     end
>   end
>   return nil
> end
> ``````
>
>
> Den ons 25 aug. 2021 10:24Axel Rauschmayer <rauschma-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>
>> For two filters of mine, I’d like to use a singleton block construct that
>> triggers them via a class. I was considering using a horizontal rule:
>>
>> ---{.pause}
>>
>> Alas, that doesn’t work. What is a good alternative? If there isn’t any,
>> I can use the following syntax, but I’d prefer something that fits into a
>> single line.
>>
>> ::: pause
>> :::
>>
>> --
>> 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/066d8f5e-ede0-4705-9f38-4add41cb7ff1n%40googlegroups.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/066d8f5e-ede0-4705-9f38-4add41cb7ff1n%40googlegroups.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/CADAJKhD-nf_TwJ8ojdN2zDhAc%2Bq-7svG713%3D2ZMDzeG4e9Edvg%40mail.gmail.com.

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

  parent reply	other threads:[~2021-08-25 16:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  8:23 Axel Rauschmayer
     [not found] ` <066d8f5e-ede0-4705-9f38-4add41cb7ff1n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-25  9:41   ` William Lupton
     [not found]     ` <CAEe_xxj-V3A-p31hUvuxy9WhJF_51-Lot_0R3zpnQGzHa-KuCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-08-25 15:20       ` Gwern Branwen
2021-08-25 16:14       ` John MacFarlane
2021-08-25 16:33   ` BPJ
     [not found]     ` <CADAJKhCHPhqJz_8b8EikbNoh_Ytyn5iPefS3cvkQA=tjD94nMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-08-25 16:37       ` BPJ [this message]
2021-08-25 19:08   ` Axel Rauschmayer
     [not found]     ` <60bb4763-544c-4a15-b09c-d545aa60dcb1n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-25 19:55       ` Axel Rauschmayer
     [not found]         ` <b77d6ced-e951-4fec-8bb3-5ad8ed1c76a4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-25 20:29           ` John MacFarlane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADAJKhD-nf_TwJ8ojdN2zDhAc+q-7svG713=2ZMDzeG4e9Edvg@mail.gmail.com' \
    --to=melroch-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).