From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32530 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: html checkbox to markdown Date: Fri, 5 May 2023 09:04:41 -0700 Message-ID: <3C5955E2-B09A-4805-873C-345300ED17F7@gmail.com> References: <87zg6ian3w.fsf@zeitkraut.de> <0d96eb75-e25a-44b3-880d-94106f0b2cdbn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) 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="18316"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBG6S2SRAMGQEY5WO67Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri May 05 18:04:46 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qt1-f187.google.com ([209.85.160.187]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1puxvK-0004Xp-LU for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 05 May 2023 18:04:46 +0200 Original-Received: by mail-qt1-f187.google.com with SMTP id d75a77b69052e-3ef34e947edsf19903341cf.3 for ; Fri, 05 May 2023 09:04:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683302685; cv=pass; d=google.com; s=arc-20160816; b=o7cDVd5wuYarvTD8VrksOizfgYwed+YfOxJR05VwdSO/TOcBHhiatPead50qdoiRPZ A3kIl3U0rpLVDQJrQ4Axbl6mF+XDEyF6l/m7rmiMopgen4UcbKFybTMlNtUEWh3tK8sF nbvly0Runo87CKOZ1lXxGAvSqCNpWwlMBiWVsTaev13N5asUWeZPAtdreKMM9GyJl+74 O5wojTKb3cESxEpMTYEnVwcheB4jUzFjWxuQ6xxcRGJRs/Sf1rQukeMN1fmCEa7R4Pqh rSGCBfmzChXhzpoww6BhjBeQzd9VhuIQ+yqkOPIg3HsZ4GhggPulYjIoVR4/0rynw85a 0ZZQ== 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:message-id:in-reply-to:to :references:date:subject:mime-version:content-transfer-encoding:from :sender:dkim-signature:dkim-signature; bh=nt/MvxATEVmxaVJwkM1fTwbc0xY0CyF8p7bA1d6cXM8=; b=TfhBN3dlLkbCTYTukI76aF7fStQsrVkKFFnnWESb4ZI5Lq7jMoIMMgG0G0k1x2wME2 Ch2F71yRfeYRaQ3oeW8R7ZpN9+x5wdstMa9QeZC0Fao+pzYssCuL6fAQ1lGCRJSH8WL1 8g9c7zJqJBDBfxrs/ovOIjyNHJnAkHJ2TB8yO4N+Ta4yDqF8rvIQsGHfSd3mXf9/BtX3 biKwv3S8wp70dc6Cw/EaYSNr58vced7BXL7xmieJSCJIyTefh6+OevtBUHFX4EJ2qjEA WHHurm/rZiqSxtNL+dz7aFrHTX52Wu4jQnSMklj6fvhtu8Gbu+gs3WWwcpmAKP/C7G2/ U7cw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jKoOmbxF; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42c as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1683302685; x=1685894685; 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=nt/MvxATEVmxaVJwkM1fTwbc0xY0CyF8p7bA1d6cXM8=; b=cUOdPgQCMeXE8Unzgnm7/HTji73vBtYPGyvrbidTtbJ4aia1S83hpNZQbN/UnY5Ky9 5bBRtfvAhbnJmlIU+y3KU+TqXgKVQ69KS9Gypz3GLSE8RxU2wQGJNv0tQ1Gyo1ntjaTo Zn4xUAw17NLISilxZoDj1FMdEmOV/leshX8j8GX5Vh3TkZQnCDiP+AKw31JA4of6riWt Z0FGsMvBjlDtTQhggiJocykL9+7bwB8d47CvAkFrVWbAkEPuqLc3HtqL881Er+5fDORg lSDu+3mZYJ/35Z8n2YPpfi1Z7+D+XNJReHOgB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683302685; x=1685894685; 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=nt/MvxATEVmxaVJwkM1fTwbc0xY0CyF8p7bA1d6cXM8=; b=SzHnAU1OFRJ4I41OhYaV/MDVTFBYk+/vtZkJ8IEM4kxS8cIQlvkgyAt8XKDx8Ggjch jxsbS1ll0oZevMoxBXus6SEa5j6ThHEyHcHEVgk2CpnRLXPrLvNEZYV8eu7ZL3JB5Xd0 5ccEW5O03w+/INUV475vsewHnBhRBJZRCld5xZPfhCBGqgJSEjVK+gO2oVKa6RRdPKw/ /T5JZWCrOSEPFax0u235hOW8V547WHbcOeu+pXAH0Yk3eKE66b9REWsduSkhjkMbgWiz 55m3GxOHk4bL8eNxakQsl1Eka5EwS126MwHMYpSKsBPzYlF8DKP X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683302685; x=1685894685; 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=nt/MvxATEVmxaVJwkM1fTwbc0xY0CyF8p7bA1d6cXM8=; b=SxMBgAoE0AUOPuBaXTi03rMo8F3kZAktYyppix+lXcNbkIJ0io9cLHxt+4diDmWsE/ YT37f3oTpJ4MKqG2lzy+TMovmZCdVweTlHeIN8kLd+9G2vkrdPIO9RkADZgT5tA1BjLl YxtghvB8t4J4KWpf/+6lJmY4P2y25Xs2YXmdCLu0W1m6xmQl4j+L4BqcA7i4T0gjA/jO 3uK7ruyEvJKSx+pHmfUmjd0vdGvFShbSCMLIOgO4K8l6ZmmO14nU6bL/v+ Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDy6sRO5BV8CQ4YoJRxWH/nSTGtMCS+xGnE26tFWxhYQ+fbqBKMu AU6esEpApqA0HuAjAcxR7Hs= X-Google-Smtp-Source: ACHHUZ7nSG3iWd02XthDWuVIVUc7ZwZlO844EVxJYnnpMQJPRt9MgQIBfegzAsUAnX+1nE2CZkEZgQ== X-Received: by 2002:a05:622a:486:b0:3f3:64cd:7c60 with SMTP id p6-20020a05622a048600b003f364cd7c60mr592074qtx.3.1683302685582; Fri, 05 May 2023 09:04:45 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac8:6f09:0:b0:3ef:3784:2c24 with SMTP id bs9-20020ac86f09000000b003ef37842c24ls20305729qtb.2.-pod-prod-gmail; Fri, 05 May 2023 09:04:43 -0700 (PDT) X-Received: by 2002:ac8:59c7:0:b0:3ef:7d5d:9c3e with SMTP id f7-20020ac859c7000000b003ef7d5d9c3emr3629302qtf.34.1683302682943; Fri, 05 May 2023 09:04:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683302682; cv=none; d=google.com; s=arc-20160816; b=meZihvWzM3JWVCAhM268953n3nroXZ/rukEIJCRq+WsKYAYDJ90xaup+C/vFzlO1p2 1FG6E0Pk0ZuqNmOgyQa3IkhVkbGP7PDHeKOETYMHza7iVEAki1OAsAVg67FQPh2tqiYD Gvjil5rzib8+mpiAmZ+mZJQLwaiN6tX+fOkBplCoYXPEtHTo9u9VQexTRHBP0XkPHhTB w4k/9cfnk5EpwCqj7mn1AiKFSZgioWvh/VwX8jdTqBu8LgevjAek0mNx8T4igoidvuUL aw3JfuLydXPL1nA/sr0/rrKCe20UaoKFEgNvm1KcG57vlotS5JQ97/GpcC98smXQEioW H2qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=DWq7K6jgNA0gPoj6BEuLF4m/IHDU2qDIUj4+TDTmWl8=; b=WqidzpTNbLti0W+ju1w1nPH1EMOApZSQzacClodoEW1YW+4QvSp2jmEoWFI47sFFnY hfTi9jBm/leYAL4lrT7KXu6aOg2TT48puLbmdP01QEPqjUDHJyjd7v7Vrgr88khg5868 RHIUu53myrRlAfXGeyY7s/g01LYamJNag2UdpL0rXz5jb/GJ14xsCLHoHkONVQ8v5ZzL ZO53h3GPM2dO3y36hNsDpFMQ9BNqUV5CyObENyiFkdOdKOwuWPBE1OFYcfhIdV/aD9X4 PXYZaEp4pVaDSN3a6kVg4T2jz53wT+PyoJO+DK4shei1lutcwRaCn09+qxRsw3Q8a9rk J8Ng== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jKoOmbxF; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42c as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com. [2607:f8b0:4864:20::42c]) by gmr-mx.google.com with ESMTPS id fy22-20020a05622a5a1600b003ed73a9d023si141861qtb.1.2023.05.05.09.04.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 May 2023 09:04:42 -0700 (PDT) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42c as permitted sender) client-ip=2607:f8b0:4864:20::42c; Original-Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-63b5ce4f069so2137355b3a.1 for ; Fri, 05 May 2023 09:04:42 -0700 (PDT) X-Received: by 2002:a05:6a20:d48c:b0:f6:15f3:ca36 with SMTP id im12-20020a056a20d48c00b000f615f3ca36mr1898335pzb.50.1683302682189; Fri, 05 May 2023 09:04:42 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:644:4701:23f0:a8db:479d:d77c:228c]) by smtp.gmail.com with ESMTPSA id s1-20020a635e01000000b004fab4455748sm1857421pgb.75.2023.05.05.09.04.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 May 2023 09:04:41 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.3) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jKoOmbxF; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42c as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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:32530 Archived-At: The proper way to do this is: % echo '

' | pandoc -f html+raw_html -t m= arkdown ``{=3Dhtml}``{=3Dhtml} Using the `raw_html` extension with the html reader will cause the unknown = things to be included as raw HTML rather than dropped. If you don't want t= he pandoc 'raw attribute' syntax, you can disable that: % echo '

' | pandoc -f html+raw_html -w ma= rkdown-raw_attribute > On May 5, 2023, at 8:27 AM, Gwern Branwen wrote: >=20 > The Pandoc HTML reader is, perhaps surprisingly, worse for reading HTML t= han the Markdown reader, which will generally preserve HTML (because Markdo= wn is defined as a superset of HTML). So if you want to read HTML without e= rasing stuff, you are generally better off specifying the *Markdown* reader= . The results can be kinda ugly, but there's no way around it: there is no = 'native' Markdown for a checkbox input, so it uses the fallback. >=20 > Example: >=20 > $ echo '

' | pandoc -f html -w markd= own > $ echo '

' | pandoc -f markdown -w m= arkdown > ```{=3Dhtml} >

> ``` > ``{=3Dhtml} > ```{=3Dhtml} >

> ``` >=20 > The HTML reader can't understand the so it is silently dropped. T= he Markdown reader treats it as a HTML fragment embedded in Markdown, which= is preserved as a literal, and passed through. >=20 > --=20 > gwern > https://gwern.net >=20 > --=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/CAMwO0gwyAFsVjJFyxJBB18p6innDv0ssH1Dx4NBo3Je5BvuoeQ%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/3C5955E2-B09A-4805-873C-345300ED17F7%40gmail.com.