From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: Bart <bart.hijmans-df9nrXIP1oRmR6Xm/wNWPw@public.gmane.org>,
pandoc-discuss
<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Modify syntax-highlighted code blocks with lua filter
Date: Tue, 30 Mar 2021 09:12:33 -0700 [thread overview]
Message-ID: <m2blb0ipse.fsf@MacBook-Pro.hsd1.ca.comcast.net> (raw)
In-Reply-To: <88f14d06-7079-4330-a7ad-a9a3d9b0e4c8n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
You can't do that from a filter, because highlighting is added
by the writer.
Bart <bart.hijmans-df9nrXIP1oRmR6Xm/wNWPw@public.gmane.org> writes:
> Greetings,
>
> I am working on an application that uses markdown and supports code blocks.
> We also let users mark fragments of code blocks as if with a yellow marker.
>
> We currently have a lua filter that does the marking, but it does not work
> in combination with syntax highlighting. It never returns the CodeBlock and
> so the highlighter is never called. I have determined that in order to make
> the two work together, I need to take the following steps:
>
> - determine where the marking is supposed to go
> - remove the [mark] tags and send the code block to the highlighter
> - insert the marking in the resulting highlighted code.
>
> However, I have not found a way to access highlighted code, or call the
> highlighter, from a lua filter. Is there a way to do that or is my plan
> doomed to failure?
>
> I am also open to other suggestions.
>
> --
> 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/88f14d06-7079-4330-a7ad-a9a3d9b0e4c8n%40googlegroups.com.
next prev parent reply other threads:[~2021-03-30 16:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 10:37 Bart
[not found] ` <88f14d06-7079-4330-a7ad-a9a3d9b0e4c8n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-03-30 16:12 ` John MacFarlane [this message]
[not found] ` <m2blb0ipse.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-03-30 19:38 ` Bart Hijmans
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=m2blb0ipse.fsf@MacBook-Pro.hsd1.ca.comcast.net \
--to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
--cc=bart.hijmans-df9nrXIP1oRmR6Xm/wNWPw@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).