From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28274 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Process inline codeblocks and normal codeblocks differently when converting from md to html Date: Mon, 3 May 2021 06:56:28 +0000 Message-ID: References: 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="13666"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBM55X2CAMGQESBDKY2A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon May 03 08:56:54 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f63.google.com ([209.85.167.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ldSVi-0003TH-2g for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 03 May 2021 08:56:54 +0200 Original-Received: by mail-lf1-f63.google.com with SMTP id o17-20020a0565120531b02901cbedc3fd9esf1693546lfc.19 for ; Sun, 02 May 2021 23:56:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1620025013; cv=pass; d=google.com; s=arc-20160816; b=igqENM5QekbiJ30cJqhZtQ7MRz1G/Cr+FyBvlozJZcMlw6IiEtLiPvzmxPmxIQvChL IUsUrSqhNef1S8riCnSQlbdC4XX7S6fVlzLxD1uQRGcqA/+hkv9pBxKhhI9VJIq9qxpM R1LQ3jWDyoV1km2Ls7wQNkWYtydWJp3e+ZrYxB+ga5Ejgl4OkhbEGzjCBtSsIShnBpbg Gm3kriJamwWqUd1R9V6np2GqwwyDQC3ip0XOyTbwKHOZuUQxi3zOJ5oFDJ20uPsDn88W fkTNVqCbiLPccVPRkHQXO1RiMNOVrMESdPOYKrMA1N4RfJeK8QL4du9UfMQYaR6Od3Pl EjUw== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=nhMsk/Bakg4H1qSdCIWCiIyZwhtM74D/d1Z987qnK94=; b=Gg7LdF7/DFFR+VdLOSDh46suo3AlwUiCRKSkA4PeQChf+UPU1kdjR6lXhYm0yiQQ1j 6idJg39lQG1rSz2ogyAdS4yU49zQC8hdwClxKtqsqmq88pmLe14MqKDVSaOH+Vd4/Nr1 17R+WXhHoIOLph1Skbd6GaSmZuH37k58Xi/hG9BCkHCWN8qIxeMlz/T0JVlu59yRAQIO M0NJAmrPOc2GkqmazvPBRPS66fgxmzh5m1d96Nmpr7INpXNWPV0xpcjIesXFdh5G9vfO NFpSJGCzMbtrrxS5HKEisPHn9pv0lLtgKuBDuXpwMJhg8TkBCtSgGz8jirShbUSx60gE SWGA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=e+W8H1oR; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=nhMsk/Bakg4H1qSdCIWCiIyZwhtM74D/d1Z987qnK94=; b=jYElktxFNIw7tc8zOQ4JiPZBSMXeIxLrUDVRgn4SafAjbjc8w6+nWm0kIU8+1ZXuS6 wJg12MqDqZu30s1vjUbySZEptr7F9F88F0LCQu0+V93z9Aj8YhDSpAbdRuANKpfMCgQL u6WlOjV2wrncnAc4vfOdaUcdxcu/A1ezecyRZsuuhKGOgyhVqeBLR8X1OXZAmA0qnwKc /Iu/QD+93wc/8tKX+qHdPTFDbt8eUWue+Mf0ZbfG7GcxLzzLxLVzmPzqRSfQliDBA2WW V5JzWc+FEYhbxz3eiCWjN6++V9hJj42P5fk8TH0VJGO13dSMynecZG3L7tthNJ2WAdlB MHQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=nhMsk/Bakg4H1qSdCIWCiIyZwhtM74D/d1Z987qnK94=; b=Vh56BKuvNZt1cmG5ODiMGerbM8hmzK60QCLrYUB4zTbHLwWEcB4e1o+zIwGpk3O3Co 6QBeY5sOa6eFutf04c75mp2IfG0yaBIWW6X1UOxI8xMUjjrmvNeYleGPBXfgAmQFxzgk IhWepHQtWdRHeez9d8kdA1XHBheW1wayKZ9azWDs0ieEB/rju2QJuquNWnyJGFvAUufm 8swxAs+94LPIFcKB2he0C0swqUg/V/95HUmDY2IXOfJAnMTgONzx9j54FEVWuoPglUUN ZBpdRNBLlkCepiOArFg2GLKG7lEM3lRCIV1d/ysRZshO Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530lKhwhOqHCbd59/lj5JYR7Gi2XMP6BhCcrZrJgPoyH2Vv7JuTl VWsOXjtZkeR09SPvJZ2asv0= X-Google-Smtp-Source: ABdhPJwIdyEzGS6DQh3Uc8ndzG47WW8GTEHEBeJ3qZo3AZe769ONHXgEw5ErqVB0mGIf+T+shihL2Q== X-Received: by 2002:a05:651c:b20:: with SMTP id b32mr12568706ljr.42.1620025013663; Sun, 02 May 2021 23:56:53 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:a785:: with SMTP id c5ls3153749ljf.8.gmail; Sun, 02 May 2021 23:56:51 -0700 (PDT) X-Received: by 2002:a19:6b07:: with SMTP id d7mr12225064lfa.551.1620025011024; Sun, 02 May 2021 23:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620025011; cv=none; d=google.com; s=arc-20160816; b=aXKJl32i+opwkoobYXJaolTgby09hv+RFzQ1pVVBkeyMlJAf3uo8GgWr1WWzg1p8vJ q6IOcJbnCzJ9fDaDfP8cHxvJJtNP6aVXL6BPoZ8MwQ32oLDL2JDO9bN24IQT0OaRXgqS 0bCi/FPMpE4KW5oBjMoAjhsxzj3R1jUcqhZWFkNeM5DKOzs3MdgOC71qjZNoO2wyH1ZK 4EYPc7HlC3vubohbZgweU7VcphkjpygR//DiA367mIOS6jYsyo72QA2ITw+nV/XTVrbD 4kB+NksME4FRdGjFLdMCy8tCllRxNHG23an3vL83St9+feqCRL+Mh1ycT9j9sRZuQwbL Jn4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=X0w/4BvUrHHaG6cpKswdX9LjVNqnpPv7JihXE6X4KN4=; b=Q7NwYwoFl6LvgxtERhCmTPUMRLWXqU6BhZTkNOQLReVkBnQtFWv+i7yg3ecL+NUz44 lh7Zr+9JCAhC6F6bMhZ31FNdEDMzhdNbO6HN/T10IKHcU4SsDEToSKPSUodP2wsB4VHp Wl3uA1qfTfIYaIrj+Ky9A8ZH5XbmqbBWoVcns3J0dtROr+aQyHw8oz9BvXzSYTvIvDkD QsYgai9F6VVwsF+cWMP4vFgzbuWAKYXs81Hf8K1SHNDRyxOma26cge0fw3y/SHoVWi38 7SdjmYdgVLWejskjKDX3L8k4ar4MZf69YaW5BPVYyRvslcJzPklSZUNQMNBBZZuwxi4E /IvQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=e+W8H1oR; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id v3si1107447lfp.0.2021.05.02.23.56.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 23:56:50 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 2C9FF240100 for ; Mon, 3 May 2021 08:56:50 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FYYg52chGz6tm9 for ; Mon, 3 May 2021 08:56:49 +0200 (CEST) Content-Disposition: inline In-Reply-To: X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=e+W8H1oR; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:28274 Archived-At: This Lua filter should do what you look for without any need to modify your= input file: ``` function Code(elem) elem.classes:insert("inline-code") return elem end function CodeBlock(elem) elem.classes:insert("block-code") return elem end ``` Le Sunday 02 May 2021 =C3=A0 09:17:32PM, jeremy theler a =C3=A9crit : > Grep for=C2=A0fenced_code_attributes in the manual. >=20 > On Sun, May 2, 2021, 20:36 Dominik Heinz wrote: >=20 >=20 > Hello, >=20 > I am using pandoc to convert from markdown to html. > The markdown document I am processing contains both, inline code bloc= ks > (single `at start and end) and also normal codeblocks (triple ```at s= tart > and end). > Pandoc wraps both of these in tags as to be expected. > However, since I want to style them differently later with CSS, I nee= d a > way to differentiate between them. Is there a way to tell pandoc to a= dd a > class or something like that to the code tag, when its an inline code > block? > I didn't find anything in the official documentation on how to achiev= e > this. > Any help is appreciated. >=20 > Cheers. >=20 > -- > You received this message because you are subscribed to the Google Gr= oups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, sen= d 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/ca5c7bce-bd16-420e-8e14-274f502207f7n%40googlegroups.c= om. >=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= email > to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/ > pandoc-discuss/ > CAK0LiykNeu1wkPP9TsB92OrDK7LNdneicrXFADCU-aR2rbz7Cw%40mail.gmail.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/YI%2BenINDxIJIi86F%40localhost.