* Skip inlines that are also captured in other constructs such as Quoted
@ 2021-12-11 15:41 Pum Walters
0 siblings, 0 replies; only message in thread
From: Pum Walters @ 2021-12-11 15:41 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1224 bytes --]
I'm writing a filter to process Hugo <https://gohugo.io/> 'shortcodes'
(templates) which typically look like
{{<highlight prolog "linenos = false">}}
1 eqnc(N,ok,eos,eos,Cc,Id1,Id2,L) = lst(Id2,L);
2 eqnc(zero,ok,str(C1,S2),str(C2,S2),Cc,Id1,Id2,L)
= eqnc(zero,eq(C1,C2),S1,S2,Cc,Id1,Id2,L);
...
{{</highlight>}}
A shortcode can have zero or more arguments and a body; the arguments may
include quoted strings such as above. Currently I capture the arguments and
body to be processed at the closing tag. The constituents of the quoted
string trigger `Inline` ('linenos', '=' and 'false'), and after that
`Quoted` is triggered.
My current attempt is to store all inlines, and to drop them when Quoted is
triggered. But it seems weird.
Is there a better way to skip the all constituent Inlines?
--
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/55a93bab-31ed-41a2-bfd1-bcad213154f6n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1810 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-11 15:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-11 15:41 Skip inlines that are also captured in other constructs such as Quoted Pum Walters
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).