public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: rrraf <rblists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: how to add numberLines by default in lua filter
Date: Sat, 10 Apr 2021 06:25:21 -0700 (PDT)	[thread overview]
Message-ID: <6e0ddb7a-4a21-4375-ac3a-75c3570d70bdn@googlegroups.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1144 bytes --]

Hi,

I'm using the lua filter include-code-files which include code from a file 
in a code block. The attributes of the original code block are preserved, 
and so the class numberLines can be used. I would like to modify the lua 
filter to add the numberLines class by default, but I'm struggling.

This line:
https://github.com/pandoc/lua-filters/blob/master/include-code-files/include-code-files.lua#L56
is where the attributes of the original codeblock are passed, using 
cb.attr. I've tried different things, but can't get it to work. So, my 
question is: how can I add the class numberLines to the cb attributes 
before it is passed to pandoc.CodeBlock so that the generating code block 
lines are numbered?

Thanks in advance!

-- 
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/6e0ddb7a-4a21-4375-ac3a-75c3570d70bdn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1530 bytes --]

             reply	other threads:[~2021-04-10 13:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-10 13:25 rrraf [this message]
     [not found] ` <6e0ddb7a-4a21-4375-ac3a-75c3570d70bdn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-04-10 20:07   ` Albert Krewinkel

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=6e0ddb7a-4a21-4375-ac3a-75c3570d70bdn@googlegroups.com \
    --to=rblists-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).