From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29820 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: how can I conver one style markdown to another style markdown Date: Sat, 18 Dec 2021 18:24:11 +0100 Message-ID: References: <631a426b-f5d3-4677-a029-0ef30863fdf0n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f2769205d36eec80" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12363"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBRFS7CGQMGQEAUSNEQQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Dec 18 18:24:25 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f61.google.com ([209.85.221.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mydRY-00034m-Nt for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 18 Dec 2021 18:24:24 +0100 Original-Received: by mail-wr1-f61.google.com with SMTP id h7-20020adfaa87000000b001885269a937sf1625887wrc.17 for ; Sat, 18 Dec 2021 09:24:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639848264; cv=pass; d=google.com; s=arc-20160816; b=LoEiviiZ9lacL+Zkzr7O16jRbXqh5cIIF7hBpaBme22o9AmxBfZeGC71D+i9D5ozL4 DX8yUoXpl3SgL6sDq2titO3Y1RTMaQUARN1B0r2jtuCNH+su7Dgua13+5R672fn3fmD5 j32M8CpqzrTtoBfzmjN4se0TfZ0S2IewYW+ZpE6iZccjhegvvEaaZukEgEQ2X3makWoH Ei5CBJ1le2YiKl+DSHWYcX4DlR2e5nqtas/9APNaIdgHiLrTPTgv/iLCt74dhY03APf3 bVTYwrVJTdtqbELH7VigRSHdWS15EWcXeGks65J9R7bOyiPN2lI5caUr++OxDAaNEwSO u74A== 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:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:sender:dkim-signature; bh=7jh5sFKRDbpyM3GWwwZLnAA0a0n3BYCvgzJfjdt4Mlk=; b=1H9hEAAKnXKStP7B7wnGzNSYstl1XEH/87DGYjy4lwsREur6XPr5xlqmhxVW2g1jVP jDgzmjdaplZW+l8rcgYNc26RqyMsIo0ICaV67N0BSPgZyvJIhtMYud6Go0nMqdUyifS9 yETnewpwg3scbXpzWaJSAXQuDLvhXSZQ87r+9HESi/9GDh++PmVuB8naa6AECu89GkSM qlEfDBKqPaM8dl90lnZgbEmZp2ffb1bEViulfXvQYmqK6/AyHF48ckb5NrSgOcqETLDJ cMmJMKLmaasA2sNHSS4boQrEvGpoChv9TuWSSdBjL/BcPnnfE0jys7OBzWxg8NnIXr9S 5GyQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.208.182 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:mime-version:references:in-reply-to:reply-to:from:date :message-id:subject:to:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=7jh5sFKRDbpyM3GWwwZLnAA0a0n3BYCvgzJfjdt4Mlk=; b=tbSXPiyNbUrRiB5Jn6TlCvg7EeZrIJj6Fi2IC4Wyfk3glS25yPOUncvreq4o1gfyiS p99pvZuTcVTgN+ygX7t8FCg1N7oU+Q6mOHQfICNNk0eeT57hwhMBANSRdEHTjJI8gWB4 yfcS+AqZGUrfaSva+aCDtmyvpE1ZuckD/HUZVmXNKnWoalHIqE2ijWn+Q/e5fgYLx9+M ELEAKndU5RvGjyyyEvamzcneOtLmTsJ+90zBS9Psj7kkNVaSgBalU+tudsdEfVp6HIRt oFzoKPTfiMk81u7Yv01fQHYtUMw4Ups5hxexJvMixyjH8M/QF8cTwCvIAHzD+iMo/wr4 KhZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:mime-version:references:in-reply-to :reply-to:from:date:message-id:subject:to:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=7jh5sFKRDbpyM3GWwwZLnAA0a0n3BYCvgzJfjdt4Mlk=; b=WC/u2ES3knqIsh+r2CDNiwMB1RmUKoAn5W/ynYRLsLCLMJ62RpM8qMAQl7yCUNSXA5 032zqBlPFPs6BwkosP4SEx1jVIxSig8cH1rKMNjJRGNBfuNP9opVH1qc5qP6aVnRYf2b wDJCjB5Ojfhb/KzvcPLTnlj6XLmzCS0ms7ah4rauz0XwL4frBAxar9/OYkbjjqWzMqVf JmvDn5jj94XFkWFshv35HrFVkeCblWVaatg5nr0KNRofA8RMvwGm49nArA+UNaPr4PY5 QNVBA/CLraSbaMv6rA47fw3jY/F+W5Meg7FSLT7aozBfEEcL35qKgPqGV05HWR4murWC bvgg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532gZOR0WtaHO/I2TIeLW4GSYQXpsjCne//3+NLgvbEcu8OKh9Fl zl5Vcxz64WmGQemu44LZ7/U= X-Google-Smtp-Source: ABdhPJzLz0ChGUnSKIrQfzfP9ipAHRc0IO45I089sWE33tMBJUl3XuwW20bcjjheBgnaZI5vjFOhEA== X-Received: by 2002:a5d:4acb:: with SMTP id y11mr6867099wrs.64.1639848264203; Sat, 18 Dec 2021 09:24:24 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:600c:5119:: with SMTP id o25ls109025wms.1.experimental-gmail; Sat, 18 Dec 2021 09:24:19 -0800 (PST) X-Received: by 2002:a1c:a905:: with SMTP id s5mr14714427wme.85.1639848259483; Sat, 18 Dec 2021 09:24:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639848259; cv=none; d=google.com; s=arc-20160816; b=uM8xwBrLPtcrN4xC0572WUP2LTNmomlMRs11irhwQraVb6aUyteZSP0YePsOO1LcnD 8YJL+67kNYqISLpkLKbhHIoceT5qL7BYpe5NRz6OM1bddwTx9mzvCw8Twf3fvpsbNj5u B3M0F4Pzq1Uat46zmGmo7zUyrxAyDWF005pLYqSVSqCOf1QbcF9EcbuJLugxaMOYnyzO Nqm0C17D7nHQpWRamPkyRnCfUJ2h+Xtlkhbb2KZcRi/0fVPMUprYemAxARipikQuTV5B Z9BwCTejuD/OuBg+2cYQuKcYsxEJ38uiSiBjhgqKmzLRzzu+NWN6PQ3xn6MjsUeKpy3K 0ZaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version; bh=nDRxk+F1Ra7OmFgM6HfJq1vmo8QLH5XlA3pazDK0fOU=; b=cDzerlaU/12YirbjgO+BIywOp6TCTB5AipTnXku5sFjtWTu+AF2JjCHZI/WFWfYHZ0 clsfWZwRYywbCdm9+p3AhcRgRV+MQei29kza6yGvDZYmqNpiIK/XTlcOndHV0fFJoLay 2F4OjboIVGt6aU540yBqA9Tla2VX3Iv5NtAFhiZrlF3EFhtelppPw9K/2f2x168eqoAY DMcN8l0KMaWxFyqZLz3oYUJs1VMjWwnKzKy/B2Vlvethl5Lgf9rFflsszrhxYFpyTEID R8GBEssW8GYhWKt44dFxdETDqDPykXZ/90e1Egb1b0gsFoFEtRwX4VpINhpG7O4WzQqg SWCA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.208.182 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Original-Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by gmr-mx.google.com with ESMTPS id f15si125812wry.1.2021.12.18.09.24.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Dec 2021 09:24:19 -0800 (PST) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.208.182 as permitted sender) client-ip=209.85.208.182; Original-Received: by mail-lj1-f182.google.com with SMTP id m12so8528743ljj.6 for ; Sat, 18 Dec 2021 09:24:19 -0800 (PST) X-Received: by 2002:a2e:b615:: with SMTP id r21mr7124126ljn.355.1639848258728; Sat, 18 Dec 2021 09:24:18 -0800 (PST) In-Reply-To: X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.208.182 as permitted sender) smtp.mailfrom=melroch-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:29820 Archived-At: --000000000000f2769205d36eec80 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Use a filter to add a class to it. If you want it highlighted it should be the identifier for that language's syntax, otherwise something which pandoc will not recognise as a syntax identifier. It is assumed that if you don't have any attributes you do not need/want a fenced codeblock. I would agree that that assumption may be wrong. You could also turn the code block into a raw Markdown block and insert the delimiters yourself. Den fre 17 dec. 2021 16:28S=C3=A9bastien Boisg=C3=A9rault < sebastien.boisgerault-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev: > Have you considered the answer provided here? (custom Lua filter) : > > > https://stackoverflow.com/questions/66945893/use-fenced-code-blocks-in-pa= ndoc-markdown-output > > > Le jeudi 16 d=C3=A9cembre 2021 =C3=A0 17:31:24 UTC+1, starsare...@gmail.c= om a > =C3=A9crit : > >> I try to use this, but not work, style not changed >> pandoc -f markdown -t markdown -o string.h.md.out string.h.md >> >> the following is a code block, how can I convert it to ``` style >> >> #include >> #include >> #include >> int main (int argc, char const *argc[]){ >> char s[] =3D "hello"; >> char *p =3D strchr (s, 'l'); >> char c =3D*p; >> *p =3D'\d'; >> char *t =3D (char*)malloc(strlen(p)+1); >> strcpy(t,p); >> printf("%s\n",t); >> free(t); >> >> return 0; >> } >> > -- > 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/ef43685e-e382-4373-a06b-= 0c46e82f591an%40googlegroups.com > > . > --=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/CADAJKhAEiFRX9nEKFbmsW_dUA%3DtaTpj1cx78vtrBuSVNA%3DpacA%40ma= il.gmail.com. --000000000000f2769205d36eec80 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Use a filter to add a class to it. If you want it highlig= hted it should be the identifier for that language's syntax, otherwise = something which pandoc will not recognise as a syntax identifier. It is ass= umed that if you don't have any attributes you do not need/want a fence= d codeblock. I would agree that that assumption may be wrong.

You could also turn the code block into a r= aw Markdown block and insert the delimiters yourself.


Den fre 17 dec. 2021 16:28S=C3=A9bastien Boisg=C3=A9rault <<= a href=3D"mailto:sebastien.boisgerault-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" target=3D"_blank" rel=3D"= noreferrer">sebastien.boisgerault-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Have you considered the answer provided here? = (custom Lua filter) :



I try to use this, but not work, s= tyle not changed
pandoc -f markdown -t markdown -o string.h.md.out string.h.md

the following is a code = block, how can I convert it to ``` style

=C2=A0 =C2=A0 #inclu= de <stdio.h>
=C2=A0 =C2=A0 #include <string.h>
=C2=A0 =C2= =A0 #include <stdlib.h>
=C2=A0 =C2=A0 int main (int argc, char con= st *argc[]){
=C2=A0 =C2=A0 =C2=A0 =C2=A0 char s[] =3D "hello";=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 char *p =3D strchr (s, 'l');
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 char c =3D*p;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 *p = =3D'\d';
=C2=A0 =C2=A0 =C2=A0 =C2=A0 char *t =3D (char*)malloc(s= trlen(p)+1);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 strcpy(t,p);
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 printf("%s\n",t);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 fr= ee(t);
=C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 retur= n 0;
=C2=A0 =C2=A0 }

--
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 pandoc-discuss+unsubscribe@goo= glegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e= f43685e-e382-4373-a06b-0c46e82f591an%40googlegroups.com.

--
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/CADAJKhAEiFRX9nEKFbmsW_dUA%3DtaTpj1cx= 78vtrBuSVNA%3DpacA%40mail.gmail.com.
--000000000000f2769205d36eec80--