From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32695 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felix SOEDJEDE Newsgroups: gmane.text.pandoc Subject: Re: Wrapping sections of text with
in custom filter Date: Thu, 25 May 2023 03:42:49 -0700 (PDT) Message-ID: <853c402b-d9ee-4c9d-8bae-15b20faf7194n@googlegroups.com> References: <2fc450a6-5a16-316c-02c8-8ef055bccd11@meddatainc.com> <93e5b610-66a2-6ac7-1d53-8a04a8314249@meddatainc.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_996_1512268597.1685011369464" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4428"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC4JXJU7UYGRBK7XXSRQMGQEROGJZKI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu May 25 12:42:54 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f59.google.com ([209.85.160.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1q28Qo-000105-6c for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 25 May 2023 12:42:54 +0200 Original-Received: by mail-oa1-f59.google.com with SMTP id 586e51a60fabf-19a6a75f9f4sf1545281fac.0 for ; Thu, 25 May 2023 03:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1685011373; x=1687603373; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=mlBKp2NsZJoOrAoWGow58ssOvx2lcHIo9QBg3E6whlM=; b=BOj3KLUgmY1q2nqfrQTPeOeOcc8DAcHyonISn5QEN8yXGB/R7iMxXjbdH6wcdf8sIj uyHf40DMhutmA9iYuqZxVixt7NQ8FVjKcvSGzLtK/NdEdxmdU/K8uHYusSYVhMDJEQ0M w+QJpkhxzCR1a2NV9hxmEzPtJ8MA5HuRdoFw0EhlJPMYXfRHz4ZaC4YUlhMQ0k82yP6E /HJIMzFtwdHgTZ0rxIdVrvQQELIx054qlA5gajsSnuiA3BfZ6nnP2305oDOS9Drmy/pU chK9OOjzpBtaIkVSmQrv3/t5Ueb0BB7HCBgWD+Mt6AoKAsH28F+l8fVGN2XGAy5+RY75 utAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685011373; x=1687603373; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=mlBKp2NsZJoOrAoWGow58ssOvx2lcHIo9QBg3E6whlM=; b=E/OhrTQ0altOfl2c8xk+KhhUQoHTBbZkNbE1PSSFcjxOT4B633UUggbS+VRPOY1J/J BQHKvjVEEq9sV/0hhiKO0vPVLFQY2ejyuNMf7DKeCoGQlGYBITtaza5RhzcGg9yDYO4u ng7XYdIFvKE1ftZBNH4RfXHQR4eY+d7AdVd1j4gVevcBVcOnT/8SSVGCpUmJD2+bldWn H5hN7DqVxOQrxTH+My2kNWVOAKbvYkh9qJgdE2v5hkGjaxNtLJSg8aIJ9bvtVeSJDLBe +sKCmmYpebHaBLlfxJNGI4o/frHnhQgO5EV6fwwwWjuoM0aGXvgR7GgEJLpky+A9D8xY xQKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685011373; x=1687603373; 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-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=mlBKp2NsZJoOrAoWGow58ssOvx2lcHIo9QBg3E6whlM=; b=hlDRkSM7zVtP8eywUmqq+wx2em2YG8Uy+1Mw9OnIqO2SdtHoe/VuJhdPZfim8IyP73 5D+uzaUHgB9MfVLxLzGEaJiPft2c/hbmqiAzIDFwkp+TpdWZcCNGRzDzuddf56fIuR1C uIXC9CQH0/PpJo4pazFjsvkZifTRvJacSOQMcRjtQ3gYJQMgV+EZmdeYYqyiWQjSJE1b 1QeKEX56eEscFX/FLEzIgtK6wisJxUWpOwpmGftHCAlLvYy9BSBn096QauTXEM4VXwWN 6ThBWYzaZ7EgopuBhuDFJzjMnOI7jG0uaGoFqJA+HCbC5hWPBY Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDzK9O9BCZ/ZSbEmxcFqTAgL0DY1ABT5rklxvFxmO++U6WUiCPE9 U3sti7ubqZGOluL2RCTKbSw= X-Google-Smtp-Source: ACHHUZ7AkY/nQFqbcV4WuHU1BUf4YnOqk630t+k4E+bAxBRnHfV0TBvxFwQb9iLJI4BPaX+ZCo0Zrg== X-Received: by 2002:a05:6870:a884:b0:192:a532:36d7 with SMTP id eb4-20020a056870a88400b00192a53236d7mr1125800oab.5.1685011372906; Thu, 25 May 2023 03:42:52 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:5a8a:b0:192:550f:9c2e with SMTP id dt10-20020a0568705a8a00b00192550f9c2els366071oab.1.-pod-prod-05-us; Thu, 25 May 2023 03:42:50 -0700 (PDT) X-Received: by 2002:a9d:7999:0:b0:6af:80ca:3cb7 with SMTP id h25-20020a9d7999000000b006af80ca3cb7mr3511802otm.5.1685011370160; Thu, 25 May 2023 03:42:50 -0700 (PDT) In-Reply-To: <93e5b610-66a2-6ac7-1d53-8a04a8314249-FcZObrvlYduBUy7/sJONFg@public.gmane.org> X-Original-Sender: soefelix-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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:32695 Archived-At: ------=_Part_996_1512268597.1685011369464 Content-Type: multipart/alternative; boundary="----=_Part_997_873313304.1685011369464" ------=_Part_997_873313304.1685011369464 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 nee= d=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 som= e=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 ha= s=20 > to be structured as outlined above. > > > > Since I am new to writing filters, I am looking for some suggestions ho= w=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=20 > several paragraphs until the next H1 tag or end of document. Another=20 >
pair (within the just-mentioned pair) may enclose the image a= nd=20 > several paragraphs, again until the next H1 tag (or end of document). The= re=20 > are some additional levels of
pairs but this describes the gist of = it. > > Suggestions welcome! > > --=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/853c402b-d9ee-4c9d-8bae-15b20faf7194n%40googlegroups.com. ------=_Part_997_873313304.1685011369464 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable You could use Fenced divs:=C2=A0https://pandoc.org/MANUAL.html#divs-and-spa= ns

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=C2=A0:
=
On 05/24/2023 04:= 51 PM, H wrote:
> Using pandoc 3.1.2 and am trying my hand at writing my first write= r to customize HTML output for a specific, predefined newsletter format.
>
> The source document is written in markdown, contains headers of va= rious levels, paragraphs of text, links to images and mail links. No lists,= no tables and no code blocks.
>
> The document is structured with an introductory section, multiple = identically formatted sections and then a final section at the end. I need = to wrap various portions of the structure with <div></div> at m= ultiple levels in order to achieve the desired formatting. Some of the <= div></div> tags need to wrap H1, H2, image, multiple paragraphs, o= ther <div></div> tags wrap only one such item. In addition, mos= t HTML tag need to have some predefined custom style information.
>
> This output will be manually added to a certain newsletter editor = in a CRM system and I cannot add any CSS information whatsoever, everything= has to be structured as outlined above.
>
> Since I am new to writing filters, I am looking for some suggestio= ns how approach the <div></div> wrapping when multiple differen= t HTML items need to be wrapped.
>
> Thank you.
>
I should add that one <div></div> pair may enclose H1, H2, = image, and several paragraphs until the next H1 tag or end of document. Ano= ther <div></div> pair (within the just-mentioned pair) may encl= ose the image and several paragraphs, again until the next H1 tag (or end o= f document). There are some additional levels of <div> pairs but this= describes the gist of it.

Suggestions welcome!

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/853c402b-d9ee-4c9d-8bae-15b20faf7194n%40googlegroups.= com.
------=_Part_997_873313304.1685011369464-- ------=_Part_996_1512268597.1685011369464--