From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30821 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Tip: comments in Markdown Date: Thu, 23 Jun 2022 13:21:17 -0700 Message-ID: References: <332666C5-9B8E-42B1-A9D2-2437FCE7B70E@coolfortheblind.dk> 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="23511"; mail-complaints-to="usenet@ciao.gmane.io" To: BPJ , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBQMW2OKQMGQEWMVLMZY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jun 23 22:21:25 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-il1-f187.google.com ([209.85.166.187]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o4TKP-0005yI-8I for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 23 Jun 2022 22:21:25 +0200 Original-Received: by mail-il1-f187.google.com with SMTP id w7-20020a056e021c8700b002d3bc8e95cbsf98662ill.3 for ; Thu, 23 Jun 2022 13:21:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1656015684; cv=pass; d=google.com; s=arc-20160816; b=eW2+f4G+gvQ0Kwporlm8SJIW50xiQIEbzPJDu1S3gJOkjMIA6hShw8DdQurxbeVcBK +RnwCn5yLZ/OWeNdOSwHgpKP5bQxaIul+W0F8559uTFcsod5GfPE8UtBLGixpiX6m5ih nGiu9LvudU9LcrWy+twZgfUokTK4YmHzR2KGQbuB4gwNIu75gLDoXOAU8RP9NxdP+KH3 QyDHNJBEsiiMY3ZGt5yToncdAUbMONduegGLMYiU0BY5eTsjWi7SnQ2gtI7z32V7jcN9 IZiJ8O8nCQDuJ947GNE3yuPlYaSepteNRxS611KvjpuH5YCulaa0Gpwu+RPgGU2dTZDF GQsw== 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:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=I5t7udz5VHAR34bUkRxFW/pATlaPqhsS/B+1vyw82XE=; b=COrz0+0H4U3PF2SbqfSIwUT+4r0BITZ/MDZl2TXUDoM4NJD+hCIs2iba2tplFgeFUD +iVbh8iEc2TBgrKgF37JiDNvNNeS8rNZvsWGRGfFstBbYYb9E5PQJoCIMHSLs6qcSsgo OrLmqvaOdo9OtRToryjLvCjfL6q30ZL6UbbDZO9RfhrmxZC1z8VgerJSNTZNmiKQ5LAn Ra8nisb3GtxZqaIFuxG007iRHrbiGeJzcoDKOVN/eTrtFtZQq0r4nXWJW+SU72V2nka9 iwIrtlXCYqSICsjVAEUPayKxIWVasZMisQout1dmjZoVHxJyIPsrkRL9gnFI2OAqX5t5 ELjw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley.edu header.s=google header.b=DdTXJsMy; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::535 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding: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=I5t7udz5VHAR34bUkRxFW/pATlaPqhsS/B+1vyw82XE=; b=BrHr7aVJ5OuAyZ+GiBEYqqq8/Q3azhljFOFDVkSPzJOEeLHRtrlAbM3KIvldu5NL2z QtQt4HjMlAv2ONwSbt3pBVFk+vmCGLVQL8VzPII8WPjML+C4CHDsSoKutTLueK4iT3JZ Po8qfjooo8fQ9dHdM13X9mpwAkgMFf4cIN1YzRuPWFP1CTpY632BeaXpZIjr8Boa7Iks qGOBF1dhHeN3eI4xtgccUS9l10m+0ZaK1ODjEeo3hkzsLAPTJF+3Rn5hCWtiMUx7ZEjH ouh5t5LYc2AD7GiSlmsyfHUfKPVfhrVTU+my+5NOUfVLQGs4xOz/G3RHzOXz/aDzcDbI jN/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :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=I5t7udz5VHAR34bUkRxFW/pATlaPqhsS/B+1vyw82XE=; b=WpPm7FpHXgFMzlthibN/mtzL93vUw6obh0LrdATNowIZ+6oDdpYhS7w2bhu7PaFNND oFJupJKWhoMRNgu+AztWrQCOpUeatVkjkNSiNsJgQCNmuYMeWykWbsLq17p0F47coI+D AkEuGtj1829IXEbDzQ60H0NGrTRMeHDbi7huQvZBG7HpsFh0yHafVGZ54lirXzZ43uxy BLm4IFFEqD2SqOqTLNb1xZjpuXXnjBUsTZ5e5+vu7kd3zGYYT3eECk/V+rkn/gLwk2N0 fVZlmi39lxqAwbukVIlfvr4GhDqXc1luLeW7t99ADBOQAPncfk/q/htYgKzcc99t859u Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora+3UFUKlcJ+Dm9PG8Jyq/G4BX3a2dme2ikmfM7TWjEDW4GKzQx6 2bZEEZZAF4uBV369u8qAiIM= X-Google-Smtp-Source: AGRyM1u5mMbEjMAbzwdzrkMBFxMzHYhJRt0yMJUkjYBGZq72nTv1hcvPIedS9DLerP8PQ3IiNsFtoQ== X-Received: by 2002:a5d:9754:0:b0:674:fba0:4e6d with SMTP id c20-20020a5d9754000000b00674fba04e6dmr481052ioo.128.1656015684163; Thu, 23 Jun 2022 13:21:24 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a02:b693:0:b0:331:bca9:eccf with SMTP id i19-20020a02b693000000b00331bca9eccfls3584141jam.11.gmail; Thu, 23 Jun 2022 13:21:21 -0700 (PDT) X-Received: by 2002:a02:9442:0:b0:339:c34a:eb7e with SMTP id a60-20020a029442000000b00339c34aeb7emr6531923jai.249.1656015681222; Thu, 23 Jun 2022 13:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656015681; cv=none; d=google.com; s=arc-20160816; b=u8qzptEjABWDEY1eZAM7teCfH+Q5uVgAlm+EAcDcqqfhkmEVE2eL4EvP+ujIAClncj ebzEtvVNWGhFPOWkQmG/z9FB1Z0WyMxazaouobKvZRFLmVDwIMuNIpo/sRPWkptycTzJ etbA/O9h3HyiTaoQVRVs6VZp/ITH5aJs4Yj4my3YHILmpKyibqkYhuN6YsbM6DZK+S+D ISMgoEfCpsmYCef8wrwIaqtX0+Mulfs2IgPj7nyzOJxdURR9LCqF4hlCXihWMdS6b1eE RjRLZD3y1kt5iGFEW68MpCXbYEcrQpXbLnBz5OuJ7vsrkrIuDgo41DCT3ojILM6iND1r WnwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=JFCfff77/XOQsCk62z5gza39Nuj4LhgS6l01jPI6lSQ=; b=uEs55y2q0wJOw5tO7Ekd2RvEiifuJpPZP/Fdbpmj332LXf1Nmrxzx74WjJMI575KCJ el+cJ4RMDtdrpycIjuXN5XDMahzWdX+XMQguMKUoFfhf/hbpjL+IrZftPk3zSsUj3omc Wg4jxqAyxGzEEyAMygMPHspXaMB36P7fUXq5+99lE+WQJ1UzL2LJNoIYG6ML1DtR6nfa aDfg5v7/Pd6fiVmQlOZlgfxOi/2gRmSwyKeEK3EXsOVhN8rQ2kTLEIZCXZUIRb9zWcOm lthzEE1FPEil2vAJ15F1L6N70fEp9ahNTwW9mMMcJ1xy4Pw0CXL02Ip7B0M6h6UtKXFs jISQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley.edu header.s=google header.b=DdTXJsMy; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::535 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu Original-Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com. [2607:f8b0:4864:20::535]) by gmr-mx.google.com with ESMTPS id 10-20020a920d0a000000b002d53221ff67si13487iln.1.2022.06.23.13.21.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jun 2022 13:21:21 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::535 as permitted sender) client-ip=2607:f8b0:4864:20::535; Original-Received: by mail-pg1-x535.google.com with SMTP id 68so451766pgb.10 for ; Thu, 23 Jun 2022 13:21:21 -0700 (PDT) X-Received: by 2002:a63:3108:0:b0:40d:7b3a:9369 with SMTP id x8-20020a633108000000b0040d7b3a9369mr879853pgx.199.1656015680150; Thu, 23 Jun 2022 13:21:20 -0700 (PDT) Original-Received: from hermes.johnmacfarlane.net ([45.32.92.108]) by smtp.gmail.com with ESMTPSA id q6-20020a170902a3c600b0016196bcf743sm182545plb.275.2022.06.23.13.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jun 2022 13:21:19 -0700 (PDT) Original-Received: by hermes.johnmacfarlane.net (sSMTP sendmail emulation); Thu, 23 Jun 2022 13:21:17 -0700 In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley.edu header.s=google header.b=DdTXJsMy; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::535 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu 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:30821 Archived-At: Maybe we could put this in FAQs? BPJ writes: > It's perhaps not proper to include this in the manual because it is an > exploit of a feature for something it wasn't meant for, or if you want to > be charitable you can call it an "emergent feature". Maybe there could be= a > section in the manual describing the various alternatives for *simulating= * > markdown comments, but it would have to be somewhat carefully worded! > > I think a better solution would be to document such borderline "features" > on the GitHub wiki. However I just checked and there is no link to the wi= ki > in the manual. There probably should be one. > > Den ons 22 juni 2022 21:13Thomas Byskov Dalgaard > skrev: > >> Wow that would be very cool. Would you mind documenting this in the Pand= oc >> manual? >> >> Will test this to see if it can help me in some very odd cases I have ha= d >> in the past. Thanks again bpj. >> >> Best regards Thomas >> >> Den 22. jun. 2022 kl. 15.53 skrev BPJ : >> >> I don't know if I or someone else has mentioned this before, but I just >> realized that there is (another) simple trick to simulate "markdown >> comments" as opposed to HTML comments: >> >> ``````markdown >> ```{=3Dcomment} >> This won't show up in HTML output! >> ``` >> >> `This neither`{=3Dcomment} >> >> >> `````` >> >> Theoretically this might break if there ever is an output format called >> "comment" but I guess that is highly unlikely. >> >> It will also probably work with your local language's word(s) for >> 'comment'; I tried with Swedish "anm=C3=A4rkning" (and the abbreviations >> "anm=C3=A4rkn" and "anm") and it seems multi-byte chars in the "format n= ame" is >> no problem. >> >> Also if you don't trust Pandoc to automatically reject raw elements with= a >> bogus format you can use a simple filter: >> >> ``````lua >> local is_comment =3D { >> 'comment', >> 'com', >> 'remark', >> 'rem', >> 'kommentar', >> 'komm', >> 'anm=C3=A4rkning', >> 'anm', >> 'athugasemd', >> 'aths', >> } >> -- Turn the list into a set >> for i=3D1,#is_comment do >> is_comment[is_comment[i]] =3D true >> is_comment[i] =3D nil >> end >> >> local function raw (r) >> if is_comment[r.format] then >> return {} >> else >> return nil >> end >> end >> >> return { >> { >> RawBlock =3D raw, >> RawInline =3D raw, >> } >> } >> `````` >> >> Notably this filter can be used to remove such "comments" from Markdown >> output, while otherwise they will remain when reformatting Markdown sour= ce >> with Pandoc, which IMO is an advantage over YAML comments. >> >> I hope this is useful for others, >> >> /bpj >> >> >> -- >> You received this message because you are subscribed to the Google Group= s >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n >> 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/CADAJKhAYoUGxuA-xFBp699= zqrYHTARhTLCmPjZ2%3DBE2T7kO0GA%40mail.gmail.com >> >> . >> >> >> -- >> You received this message because you are subscribed to the Google Group= s >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n >> 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/332666C5-9B8E-42B1-A9D2= -2437FCE7B70E%40coolfortheblind.dk >> >> . >> > > --=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/CADAJKhDBa8sm2VNKdQpdz_SsBvMYOfofJG-6-hjY6XrSL19nPA%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/m2zgi3p1vm.fsf%40johnmacfarlane.net.