public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: Dominik Heinz <domi.hz96-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	pandoc-discuss
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Create div around tables?
Date: Sun, 09 May 2021 09:44:47 -0600	[thread overview]
Message-ID: <m24kfb9aj4.fsf@johnmacfarlane.net> (raw)
In-Reply-To: <2a0574fe-2470-4280-9a54-1987abda058dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


Sorry, the correct filter is this:

function Table(el)
  return pandoc.Div({el}, {class='foo'})
end


Dominik Heinz <domi.hz96-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Unfortunately this results in the entire table being deleted by pandoc on 
> my end?
>
> John MacFarlane schrieb am Donnerstag, 6. Mai 2021 um 17:45:48 UTC+2:
>
>>
>> You should be able to do this quite easily with a Lua filter.
>>
>> Something like (untested):
>>
>> function Table(el)
>> return pandoc.Div({el}, pandoc.Attr{class='foo'})
>> end
>>
>> Dominik Heinz <domi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>
>> > Hey,
>> > I use pandoc to convert from md to html. Is there a way to automatically 
>> > add a div with a class around the table tag? Preferably with lua 
>> scripting? 
>> > It doesn't seem like Table is a valid identifier?
>> >
>> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/212bcc0a-2987-4217-8276-1d47e259b2e4n%40googlegroups.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/2a0574fe-2470-4280-9a54-1987abda058dn%40googlegroups.com.


      parent reply	other threads:[~2021-05-09 15:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03 19:19 Dominik Heinz
     [not found] ` <212bcc0a-2987-4217-8276-1d47e259b2e4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-05-06 15:45   ` John MacFarlane
     [not found]     ` <m2wnsbamsh.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2021-05-09 14:39       ` Dominik Heinz
     [not found]         ` <2a0574fe-2470-4280-9a54-1987abda058dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-05-09 15:44           ` John MacFarlane [this message]

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=m24kfb9aj4.fsf@johnmacfarlane.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=domi.hz96-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).