From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32702 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: H Newsgroups: gmane.text.pandoc Subject: Re: Wrapping sections of text with
in custom filter Date: Thu, 25 May 2023 15:36:32 -0400 Message-ID: <1F66BB1E-B5C8-4062-8202-D82C5CE9A3D0@meddatainc.com> References: <2fc450a6-5a16-316c-02c8-8ef055bccd11@meddatainc.com> <93e5b610-66a2-6ac7-1d53-8a04a8314249@meddatainc.com> <853c402b-d9ee-4c9d-8bae-15b20faf7194n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24586"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCEIZSNSZ4IRBUHRX2RQMGQEKGWXGGQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu May 25 21:36:52 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f64.google.com ([209.85.210.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1q2GlY-0006GM-6w for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 25 May 2023 21:36:52 +0200 Original-Received: by mail-ot1-f64.google.com with SMTP id 46e09a7af769-6b0c6ff355fsf62726a34.1 for ; Thu, 25 May 2023 12:36:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685043411; cv=pass; d=google.com; s=arc-20160816; b=McBmzbuZralP/3hxV9JGi4TleZqRuIjeezSENhSVdLWPHXte5wGughDmjM2r9u3j56 819muiLY65WrLyH1ApQBAkq2vyA/Lk5awXrFylLEIeXT1ncww8Da+C0gwyHAV8SqKDXl CKPYZgtjrRBbP6HUHcF99AEoRwjNkFTHpwSWu0jmzmglc1GSDSQWVHKMhWAkcvPnmFCM tQ3kJcYdWRcLyS5lyqp1zLj1gWdRaKrDWF5nfg1WEcb7/l659IeS8n1TIwqeyOzhh3+8 O8COJR+zq4uBIeMeUZtgyQjyY91YkLCRzDkwT2MwvwrrYq7R98grztT1EbgpFcJX+W9Y ibdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:ui-outboundreport :message-id:from:to:subject:content-transfer-encoding:mime-version :references:in-reply-to:user-agent:date:sender:dkim-signature; bh=WlqDDOa5E0pcHhL0vHTpph7pvp1zq2ZRC6UicZueiAU=; b=TWQVSdtwjGSgOjVXh/8PsArZHuBrsOEAZFrI81PgzBQuSHm+D2V5sg1bNEPByR8ETw C+7MrnrfqR6mIQ2JjEnzbE8xzdt+ffDJHWThiq2ASZ0GBEMBdy7xn+RTuVlqXj4AWHbk BIVbeSXgi8/RuHKBXHm36KGPpF7bbicT1ov2uIUeJl/PV6BpJYJIuorfGAUS61LjrNWz lKifXPXWXU3X010EQ5SEzsptOGvhIItedZaFNEl8zqg1Bg757sodV0JmMTL5resj1+kr 9RuqlexTxq6ZgtidiL0vtTf1ObUVC1k/bDqA7J5tPkdvCvPOTw5vI3q9s5NFW1b43tAc Uikw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org designates 74.208.4.197 as permitted sender) smtp.mailfrom=agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=meddatainc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1685043411; x=1687635411; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :ui-outboundreport:message-id:from:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:sender:from:to:cc:subject:date:message-id:reply-to; bh=WlqDDOa5E0pcHhL0vHTpph7pvp1zq2ZRC6UicZueiAU=; b=aBCC5tJ9rzA6tWHp52j/3HTizBGI7phOAImbyyyd+Hm7SbJPejTUIE19/gLRl0hL1V y71bM2alhBs3p7xSjvd5/usSDQqi5Kt/Jsx8REGxKnZWVt+ARgMQlCfC7rigjDVReHlu ZhJ290mXOc6/hX2MbBiquMbzuOlgYTalrOq8n5KSa/0eiUuIRS77WglWN2hOziscMg9i E/bbeoMC4lzZfHunDLyJuLFkUhjW0Ch/S+11+n2SI4eST3n3tsZptB664ma9EWA0v7Xm bwMrLXf8 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685043411; x=1687635411; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :ui-outboundreport:message-id:from:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:x-beenthere:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=WlqDDOa5E0pcHhL0vHTpph7pvp1zq2ZRC6UicZueiAU=; b=SLSe1Z5IRyJNA6DsV4+q+W478nqPFhIIB2LDBf3WszEj1o8CEno/j+g5L36mmcEEdf dG6WfFTWK3w1mzPFuNsf3fgrQeHMgeHE+MEZNxJWjZt/ad/lRm5KeRDMdtMsp2APlTq5 n6vmdZtFp2aBREu86jYDsfXr5fmSTS4XVFOK3YcWI6a2xjPgwQh0hvh67sdJG3XcuWss JdoYc5buoQXtSCuWElh Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDyqK8Xx5lEM1OALytPH0kzwDKz/xrDAECDKmVhPcRTLjTviZ9uG Wb/r8tEqa+sqLPyoBruri58= X-Google-Smtp-Source: ACHHUZ7UDgg4H8YZkoaY/U98wpoxsLlWygaCPKhIvR+auKZoRA5harlw0NUk01mxsEg+WxjUSeJM6A== X-Received: by 2002:a9d:6a57:0:b0:6ab:8d3:5209 with SMTP id h23-20020a9d6a57000000b006ab08d35209mr184966otn.5.1685043411080; Thu, 25 May 2023 12:36:51 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:3a0a:b0:19f:3cd:19b7 with SMTP id du10-20020a0568703a0a00b0019f03cd19b7ls38595oab.0.-pod-prod-08-us; Thu, 25 May 2023 12:36:48 -0700 (PDT) X-Received: by 2002:a9d:6e97:0:b0:6af:8828:1bed with SMTP id a23-20020a9d6e97000000b006af88281bedmr293680otr.12.1685043408487; Thu, 25 May 2023 12:36:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685043408; cv=none; d=google.com; s=arc-20160816; b=PYN61ncv+ZG3brsrlUjhaD8Sh1o2rl808ZnrpHqJqOrNxk9feezyj4qqbjKmhNxw+a fSWEFrqkqdqkxOBb0dL0njhhtB2F/nXMRvWZltqYuQuLgAAzDL8cBe1pUXYOJjphKESa +J+Jmsl5XbNf6O31vuOLIDrlJ+V8XuE7U7Rc7JViDNEzRkhUm4sSGtFwYNWum3HdEWxI OkkHlORS7J9DW3jWxkHd84an3CuAF8sAtrnKi13nLtDWDDrNpEhDgXpW3J8eKH+JR7ZD Jy5XEASxo8MJOPfgEfoQiL4Siod5fGTrQJgldDJfLKcX9rJ5JoTfUEAvCU9P8wQXsIbW B7gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:message-id:from:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=rXTdCDKlXky6kxplfCf7oARpxmJy3C7nr6TgbXfuc3Q=; b=iBfDvYNei/cnbxRG0fi3NylmE/MglLdvLEEVDmfTuF1JpsJZ/CaRtxc9nqi4ovBmIK 61bZEpkOGRMGvD49zrR3yGXXjoNFbX7bsdYsRwEqm6nBZi5hHC3Hr0pCgTzX4vzvIT2P UmLgWRpvnpolojtgd2laitzYzPdJAcuxdwXi83yMGuZ1SqVkUAyCMoRPo6djtQq2kYMW INz73qTAzQRVNmoQ4NdEUXhX25Dmj/T66z0Pqps1RXJGoZDawZrYbrmQgU1axzeUDGpy 2jd6BK3UQC/4UwfW3DMLGrwtfZJ3Ldae2ziJHZmsumVuZhWaADxgFHtQ3F8nlWbjQZiF b7xg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org designates 74.208.4.197 as permitted sender) smtp.mailfrom=agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=meddatainc.com Original-Received: from mout.perfora.net (mout.perfora.net. [74.208.4.197]) by gmr-mx.google.com with ESMTPS id 65-20020a9d06c7000000b006a5f12c714bsi323847otx.0.2023.05.25.12.36.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 12:36:48 -0700 (PDT) Received-SPF: pass (google.com: domain of agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org designates 74.208.4.197 as permitted sender) client-ip=74.208.4.197; Original-Received: from android-ebf15b6ae8bf2dde.home ([72.94.51.172]) by mrelay.perfora.net (mreueus004 [74.208.5.2]) with ESMTPSA (Nemesis) id 1McHU8-1qY1bv2THA-00cgV6 for ; Thu, 25 May 2023 21:36:47 +0200 In-Reply-To: <853c402b-d9ee-4c9d-8bae-15b20faf7194n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Provags-ID: V03:K1:M2FqAwA+BxM5g2MSYGZXlwEC/kij/oqrHVR6S2yWMnBnQy5uVS7 YD2BRiiRLf6LpckW0LpeYI1DPrYACbslmMpMS1VCj8EMxB14OLIn7lJ/MOkm3SB4XOCBbXn n2Np9yxt8yVaOIR+tcI1MlXZrN5Hy2LWh57xuko7XmSqYK3PMwnwpemWXAP8IvYmhFJwE8Q PZ7YUCYfzkVEYcNS3pLQQ== UI-OutboundReport: notjunk:1;M01:P0:y3yaVQrCqgE=;9rucGJPdQTe+C6bgMNTGgA8Yfv2 7zyU12Ou2dB5I0L51ho4VeNowfXmYCtOgt65/1qWf+/k4jZpxipR11XQ+iz2Av0snsNOYmKw6 K4TpTNLRx4XU1Y3jv0M+lPOXl0h5nftEUExTnyPrR5V7nJmAHvcYaZwzfCmuoj9WnHAGt9Iob iBfyYqx4kg2lavhCYDpyQHrC21d1+BfsBOY4xFTLSB2zALxSb+mneUo8KbX6wepVaxmFp3+9Q gFa7UOP2mdXGhlnStM1pyLjAbVXmsFFH7uVAWV2wB++aLzVjg1PhnHDDBu4tKAA+gjVlPUPF7 hbA+1wbbK2VSLoItjCwtB97YGV/L25fU12POeSezZicRdlWrml6TYyEkTL7Go0maFJmTYhS06 26XsdRyJlatG+pisbrY7u6MjZjMmT99QODE0n+yE1J99p3K+THInHbOy6PzKH++gGG6Kkpy3A DdK8NzDbzSIGpR1QdpsF1YICSsJPg+ec+KAMAL44k1u7om78Hl8oat3F2cK9AlONl6RGlWQP9 JNOEGXruuNro1nVv7Rz+r3mM17QHyoyXUasPZ9Lt8mr3OF/tFa/BmY8ej3d3bE6uWnh26k05D Pogu2lIKg+THtaICPG6MJYsLtsVyIbvFIuNRQaShE1g/qoEQEco2jSewYOtxgJkmCDq9vaYO7 iH9eVRVXkJW901NUGafVgzkO96DHTzB2XF2kfBRJqg== X-Original-Sender: agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org designates 74.208.4.197 as permitted sender) smtp.mailfrom=agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=meddatainc.com Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32702 Archived-At: On May 25, 2023 6:42:49 AM EDT, Felix SOEDJEDE wrote: >You could use Fenced divs: >https://pandoc.org/MANUAL.html#divs-and-spans > >You can put inside headers, paragraphs, code blocks, etc. > > >Le jeudi 25 mai 2023 =C3=A0 01:20:09 UTC+2, H a =C3=A9crit : > >> On 05/24/2023 04:51 PM, H wrote: >> > Using pandoc 3.1.2 and am trying my hand at writing my first writer >to=20 >> customize HTML output for a specific, predefined newsletter format. >> > >> > The source document is written in markdown, contains headers of >various=20 >> levels, paragraphs of text, links to images and mail links. No lists, >no=20 >> tables and no code blocks. >> > >> > The document is structured with an introductory section, multiple=20 >> identically formatted sections and then a final section at the end. I >need=20 >> to wrap various portions of the structure with
at >multiple=20 >> levels in order to achieve the desired formatting. Some of the >
=20 >> tags need to wrap H1, H2, image, multiple paragraphs, other >
=20 >> tags wrap only one such item. In addition, most HTML tag need to have >some=20 >> predefined custom style information. >> > >> > This output will be manually added to a certain newsletter editor >in a=20 >> CRM system and I cannot add any CSS information whatsoever, >everything has=20 >> to be structured as outlined above. >> > >> > Since I am new to writing filters, I am looking for some >suggestions how=20 >> approach the
wrapping when multiple different HTML items >need=20 >> to be wrapped. >> > >> > Thank you. >> > >> I should add that one
pair may enclose H1, H2, image, and > >> several paragraphs until the next H1 tag or end of document. Another=20 >>
pair (within the just-mentioned pair) may enclose the >image and=20 >> several paragraphs, again until the next H1 tag (or end of document). >There=20 >> are some additional levels of
pairs but this describes the gist >of it. >> >> Suggestions welcome! >> >> I do not want to make any changes to the source markdown document, the appr= opriate processing needs to be done in my custom output HTML filter. I am looking into the following (simplified) flow example: - Add a
tag when encountering a H2 element. - Add the corresponding
tag when encountering a H1 or H2 element or = the end of the document. --=20 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 e= mail 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/1F66BB1E-B5C8-4062-8202-D82C5CE9A3D0%40meddatainc.com.