From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31684 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aidan Reilly Newsgroups: gmane.text.pandoc Subject: Re: Transform a fenced div to mkdocs markdown admonition format Date: Thu, 3 Nov 2022 20:55:44 +0000 Message-ID: References: <7AF275BD-12EB-4424-84E5-1A45FF675520@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f9cc9f05ec972ee0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40666"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDO2LZEJ4EIRBX6VSCNQMGQE3OA5NMA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Nov 03 21:56:10 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f56.google.com ([209.85.160.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oqhFq-000A1z-VC for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 03 Nov 2022 21:56:03 +0100 Original-Received: by mail-oa1-f56.google.com with SMTP id 586e51a60fabf-13d553369a0sf1611615fac.22 for ; Thu, 03 Nov 2022 13:56:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1667508961; cv=pass; d=google.com; s=arc-20160816; b=PoYT5xBXgaV7k5UzfYzP10WvcafbZFLh2OPuJK5N5ls8d/nKQFSF5lBDFa2B60XhkS T+HDs5igXAYyFvx0Ws3/vGOeF38U5Z3joLfvBMSeZyjNNFGB1axkaHe3mBJMhDln9MaQ 9Mk3r7vjQlr+zSf/d0zb57j+cUVO9vfKbNnb9TwlP22VXHHh7r6o3ikgAfS1WI5Jjz8+ pRDjphwwv335X3zskcxtdP0DEzGgtNJYd34kZYEKzR1smx3qB4Eq/r0lrG6YroszlWrN 4Iho54agSkH8YAoFZufhxxCG3ipjPVIYiTs5MixOV+FJK4O8YnyTlOiUS0GA9mgc7EJ3 r0oA== 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:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature; bh=DKN8OdbjDneOAPzRSkMTqDuEPjXjgcPu7wgyGfQstS8=; b=t6qsQUrNX2ZB+WxMxl/op/p/GkcXZd5g8IdUHKL1dLcBPMzGjFi26MShhmbtv67GFZ flfn4ZNKV5X6LIRCxe+u/rvluZmNNd1m5XJx3c8ZX6PNYCZ14U+IIzgGHGzqvr74ujuw Q8NpCvJypWuE6Hq/P5sFVeZi1j0IrYr/wUhwuMkT9R+GxeaWraTYbvJ+ibSHVyASpSzj PYKsTqSxd2MgiCu6YW1e54qf7noQ1lHrfQ5IjMTjBG0gqQ/iARYrk85x1YKNSSCXRM/3 ZcnkcHl0sj15PO15kFcRi9JyW2Y2yXgXtLoi6/01AbB1EEejyzwasX/PPi2eEBsiGj5N +vTw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VYmfOP4e; spf=pass (google.com: domain of aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org designates 170.10.129.124 as permitted sender) smtp.mailfrom=aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; 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:to:subject :message-id:date:from:in-reply-to:references:mime-version:sender :from:to:cc:subject:date:message-id:reply-to; bh=DKN8OdbjDneOAPzRSkMTqDuEPjXjgcPu7wgyGfQstS8=; b=ZmBt6vl9iYisUWWnZy6fRepLsCmPbAav0ojssalFydH6AvFFlDU/SFsULtpe+bwmDW 9K9sYasXuuzkeIIN2WyDcx13Svs/1EnSG41F+YvaNeN0EPusQHN7r0sXDE/QgrVgHybm 8woCP48IfD6Mf92jRV/ovsbaFD3uzOtN26FVVzFs1ZH2AzS/x5sJxF/yNlIFczmUrWiQ VKtZDOGTgEo6zjkgi0MUnxDTudULfIMYsMcKQIwoLQpSp6aPPM5NcbfX2fvmToC+qTl7 WIPEnYdOMCtcyaRA26yW/JIHt7XBUuABqnJK+771f5GZ2t/WPbnO8oq9dOKEp2Aum/WZ 2yFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=DKN8OdbjDneOAPzRSkMTqDuEPjXjgcPu7wgyGfQstS8=; b=XiyS16+PMVZ5CaO9Qtm+6xt4MPml1Tt/R/BuMrjbtFXUfbdPco/20ChT9TUEL9Y90J Ow2wWD18/UFv1ahpv1koLUYvYnPhkVMbpT+Lass3EtStHRVhlYOBXP3+GQwd0TZbIwaG BjV8xMfQ39ZDtEesv5qUKfh/4oOJ804mnk1pGpQXUM/lRCRBXVlbZsK+z2XsgRyeaMAO gPq/N5U2z5Q3t8iYan6GwJc+SHGp8R4GGclGfQp49URzoJAm0Y5gchl7Di07u0/qY/Yp hqN63VAr8BZC5Tcoy50Y9yjdFMNISoHQ8JNGUd2Kq21kMd Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf3d5PNsvSWb2rssT8Y3LOXg+nYzzUDqAx2Jriq2ceSrFNk88CDq n1PMLlkuF/CXm3eX0mEV2ds= X-Google-Smtp-Source: AMsMyM5lSf871ZqhpxzYyrEGDR/5jefsDXwVvPGcY3LM/NXdeX+rFFvCOh35Z8zT0su41QNG2pU3WA== X-Received: by 2002:a05:6808:3007:b0:351:3de7:82f4 with SMTP id ay7-20020a056808300700b003513de782f4mr24308323oib.103.1667508961724; Thu, 03 Nov 2022 13:56:01 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:4c1:b0:13d:21ad:3b97 with SMTP id u1-20020a05687004c100b0013d21ad3b97ls1152047oam.4.-pod-prod-gmail; Thu, 03 Nov 2022 13:55:58 -0700 (PDT) X-Received: by 2002:a05:6870:b029:b0:13b:9097:6764 with SMTP id y41-20020a056870b02900b0013b90976764mr28252917oae.98.1667508958839; Thu, 03 Nov 2022 13:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667508958; cv=none; d=google.com; s=arc-20160816; b=xZ0I553/HbE8l6+Z2z6aBjuWdZP229jPyHbUwIJZ0m9fiAFGsRVeXCm4hckoZ8BB42 kGj24oGBqydeRyyO3t/VgkWE/yNBEbkOMMt1P7c5ac8lPzu63vZAuln6O9m/952u/14O syR+M+scs3DrwYrrAgpZjnbLoOk2zKCrQweJpcdElUjjkij8KpfkZsdSH1cM425A2cBa 7VLF33YYGKBZGGVlpRXy7WUcKOFoED6/d3ymKknPBQVpUHDBMEsQV8nI31T54AF5abMV ZuxOm40yY7KFGSQc9Rh2suafz0Nj8sV3plVfeNHgf6xZPKYhwrkhzsZyCRBskAkyyi8Z r3dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=JmmZkZZXyVElhP4XEtAN2qtnLatsojvtYqCdf9Suj6Q=; b=YbOXVQOC/oGcpUevAW18Xm/s68jq7U17BeBtR7BZTejVf5V8/pZNHjhn4OigF/WgAx GeJpTXvRVGkvQd18EazkTpCfl0PyQvc8fjynhx5rD0V4i8GNyDIC08YurWq2dK8rrJA3 DJOyVhsuavZGCjEtum+Uvi+j7922KvWhl3xbfrCtumfxmea9UJ/RdWQ5Y+8mlOpZfcny BpA2AaBswh4Ln+qyUCLHiDiFOjJsyGNtyOk2LNt2/P6ZZrSkEWMYWRCXgkC5CrXraVhk 8M2QPAtyV22W10gOTXy6izyU19QY1W2Udo0HC9FPuygHhfXuOcPOIVvh0MQ2V4K5ae/U 0Mqg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VYmfOP4e; spf=pass (google.com: domain of aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org designates 170.10.129.124 as permitted sender) smtp.mailfrom=aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Original-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com. [170.10.129.124]) by gmr-mx.google.com with ESMTPS id r16-20020acaa810000000b00353e4e7f335si104602oie.4.2022.11.03.13.55.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Nov 2022 13:55:58 -0700 (PDT) Received-SPF: pass (google.com: domain of aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; Original-Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-31-usGQxlFJNduTDVTATdUTbQ-1; Thu, 03 Nov 2022 16:55:56 -0400 X-MC-Unique: usGQxlFJNduTDVTATdUTbQ-1 Original-Received: by mail-ua1-f70.google.com with SMTP id y44-20020ab048ef000000b003cd69b6e479so1797528uac.9 for ; Thu, 03 Nov 2022 13:55:56 -0700 (PDT) X-Received: by 2002:ab0:6709:0:b0:414:4506:7593 with SMTP id q9-20020ab06709000000b0041445067593mr8878161uam.79.1667508956173; Thu, 03 Nov 2022 13:55:56 -0700 (PDT) X-Received: by 2002:ab0:6709:0:b0:414:4506:7593 with SMTP id q9-20020ab06709000000b0041445067593mr8878155uam.79.1667508955887; Thu, 03 Nov 2022 13:55:55 -0700 (PDT) In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Original-Sender: aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VYmfOP4e; spf=pass (google.com: domain of aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org designates 170.10.129.124 as permitted sender) smtp.mailfrom=aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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:31684 Archived-At: --000000000000f9cc9f05ec972ee0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Something like this copied from https://jmablog.com/post/pandoc-filters/? My problem is understanding how to add the required indent to every line in the `elem` - If I stringify, I lose the markup (backticks, etc) in the content. function Div (elem) if FORMAT:match 'latex' then if elem.classes[1] =3D=3D "notes" then return { pandoc.RawBlock('latex', '\\begin{tcolorbox}[colframe=3DApricot!20!white, colback=3DApricot!8!white]'), elem, pandoc.RawBlock('latex', '\\end{tcolorbox}') } else return elem end end end On Thu, Nov 3, 2022 at 8:40 PM Aidan Reilly wrote: > Hi John, sorry - yes I am targeting markdown. Ok I=E2=80=99ll try that th= anks. > > Aidan > > On Thu 3 Nov 2022 at 20:09, John MacFarlane > wrote: > >> I assume you=E2=80=99re targeting markdown? >> >> You could then just create a RawBlock with format =E2=80=9Cmarkdown=E2= =80=9D, and put >> this content in it with whatever indentation you like. >> >> >> > On Nov 3, 2022, at 9:14 AM, Aidan Reilly wrote: >> > >> > Hello! >> > >> > Trying to figure out how to use pandoc +fenced_div with a filter to >> transform this: >> > >> > ::: note >> > Here is the first line of this note. >> > >> > And the second, >> > >> > And the third! >> > ::: >> > >> > into this: >> > >> > !!! note >> > Here is the first line of this note. >> > >> > And the second, >> > >> > And the third! >> > >> > Struggling to understand if it is possible to "indent" elements using >> pandoc. The mkdocs markdown spec requires the body of notes to be indent= ed >> by 4 spaces. Is there a way to apply indents without stringifying the >> content? >> > >> > Thanks! >> > >> > >> > -- >> > 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/ddc82450-b82b-4b8f-9d5f= -30c6a28c206fn%40googlegroups.com >> . >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "pandoc-discuss" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/pandoc-discuss/65G0Kuih1wA/unsubscribe= . >> To unsubscribe from this group and all its topics, 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/7AF275BD-12EB-4424-84E5= -1A45FF675520%40gmail.com >> . >> >> -- > > *Aidan Reilly* > > He/Him/His > > Senior Technical Writer, Telco (Cork, Ireland) > > aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org > > IM/GitHub: aireilly > > TEL: +353851261126 > > --=20 Aidan --=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/CAM4RMsj6rwDLDmNxNzvUDODw0qa5NZgZtbAS_ozf%2BXJ3ZE%2BjHw%40ma= il.gmail.com. --000000000000f9cc9f05ec972ee0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Nov 3, 2022 at 8:40 PM Aidan Reilly <aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
Hi J= ohn, sorry - yes I am targeting markdown. Ok I=E2=80=99ll try that thanks.= =C2=A0

Aidan=C2=A0
=

O= n Thu 3 Nov 2022 at 20:09, John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I assume you=E2=80=99= re targeting markdown?

You could then just create a RawBlock with format =E2=80=9Cmarkdown=E2=80= =9D, and put this content in it with whatever indentation you like.


> On Nov 3, 2022, at 9:14 AM, Aidan Reilly <aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>
> Hello!
>
> Trying to figure out how to use pandoc +fenced_div with a filter to tr= ansform this:
>
> ::: note
> Here is the first line of this note.
>
> And the second,
>
> And the third!
> :::
>
> into this:
>
> !!! note
>=C2=A0 =C2=A0 =C2=A0Here is the first line of this note.
>
>=C2=A0 =C2=A0 =C2=A0And the second,
>
>=C2=A0 =C2=A0 =C2=A0And the third!
>
> Struggling to understand if it is possible to "indent" eleme= nts using pandoc. The mkdocs markdown spec requires the body of notes to be= indented by 4 spaces.=C2=A0 Is there a way to apply indents without string= ifying the content?
>
> Thanks!
>=C2=A0
>
> --
> You received this message because you are subscribed to the Google Gro= ups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send= an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit https://groups.google.co= m/d/msgid/pandoc-discuss/ddc82450-b82b-4b8f-9d5f-30c6a28c206fn%40googlegrou= ps.com.

--
You received this message because you are subscribed to a topic in the Goog= le Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pandoc-discuss/65G0Kuih1wA/un= subscribe.
To unsubscribe from this group and all its topics, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pan= doc-discuss/7AF275BD-12EB-4424-84E5-1A45FF675520%40gmail.com.

--

Aidan Reilly

He/Him/His

Senior Technical Writer,= Telco (Cork, Ireland)

aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

=

IM/GitHub:=C2=A0aireilly

TEL: +353851261126



--
Aidan

--
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://gro= ups.google.com/d/msgid/pandoc-discuss/CAM4RMsj6rwDLDmNxNzvUDODw0qa5NZgZtbAS= _ozf%2BXJ3ZE%2BjHw%40mail.gmail.com.
--000000000000f9cc9f05ec972ee0--