From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33201 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Ignore link attributes and always match a hyperlink or image Date: Wed, 18 Oct 2023 23:01:59 -0700 Message-ID: <3BE27726-13AE-4F51-8BB9-E729A21A62B8@gmail.com> References: <1fa1b803-eced-48d5-b96d-153068eacd2bn@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" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40752"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBW4MYOUQMGQEI5FXDPY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Oct 19 08:02:11 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pf1-f188.google.com ([209.85.210.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qtM6l-000ARg-0M for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 19 Oct 2023 08:02:11 +0200 Original-Received: by mail-pf1-f188.google.com with SMTP id d2e1a72fcca58-6927dfe8c75sf5466495b3a.2 for ; Wed, 18 Oct 2023 23:02:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697695329; cv=pass; d=google.com; s=arc-20160816; b=WMrKZHis2OzXm9v2WOa30eQlpyvDoM9MMlY4MXuX/1VHbhnbvYSn0K5WYHMdPrSmgC KdqNF7JogKOIwbxclFslFM57rypNVcgMQTKPuACL98BLmohCPaS6DSX6YrfHVqu2TbG7 /6tz4klatnTgRqxUMqH7VT/C8b5z8BSMx6OodNN/iXa/LsUYSBXd2dDDHmuQ2R0/Z+qE gHeEW8z8quML0k95d8NUSdCHQ15+hasPDbukJ8v3x/P4PmRUp0HdajMgaJ6Eh6hN4wZk 18GDAaazLkUnjOG3ac5Io6Ng4QP/fky+4HL85m/yljHpzoDySB+KMf5YMazdepXy7Ijm KPnA== 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:from:sender:dkim-signature :dkim-signature; bh=cD///g/rZQiYeeDyYpyGyI+B5lsNf6F4hfRSE/iwSI8=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=vmDV8l5rv8rRO0C4kplso/PRWQRclQdsl0LMgQbXtvbHUL6RBJ78ORa4QO32LO4f4x j49OEl9evSOD56u/rgVeWiqdAXwfUs8BvLcm9kWwig9ezS31zmFFfxCf+FDv72lB0VTK X2NARN5FFomGNQHaHg5EQQeMXYDAwqIkCgvj6bc9xNGbl1i+6mL1Swh7ZSgK4sku0FFu 8uElxjekQQ8XJYT8Q00gT7obQ+TupUSOldnxTvkiqryyON2Ej2bA3HI9hxY0MqV4U4Th CTBPFGxMHsAo5vCxtHJbmXd1CNvb2lsvA9OSevhPw6wlOb47Ns3Oal3pyC1LW485iRBy S6jQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mOwHzGuz; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::630 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=20230601; t=1697695329; x=1698300129; darn=m.gmane-mx.org; 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:from:sender :from:to:cc:subject:date:message-id:reply-to; bh=cD///g/rZQiYeeDyYpyGyI+B5lsNf6F4hfRSE/iwSI8=; b=MLwoyVUN38Y63WfP24rYvC5bG8BrbHAm62FBtGzIOQ5pvs+E2nBwJNNpnvUEvrKZbq zN5sBf+dtzx4zmXglMHGISI7hk3qunV4kShy7jGtd4uEkTV1IqthLFm37gJvlLvoDQul BsorRfberjSeueMQYqt0PPA8mmj7JmAMebfwX+Qpymz2tCf+j7NYY0Iv+2z5Uuazn9l2 19HQuBD7H13mkLx8dpSpGlZ00hxqSU3eJdxv9XpjW29RWLLw/jNxo44sF23Bq7MEj7S9 szwICcjkwzb0wKQscuSTCVKfbGvJNeiFRYMpOQ2Uw1QYqAKONtsE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697695329; x=1698300129; darn=m.gmane-mx.org; 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:from:from:to:cc :subject:date:message-id:reply-to; bh=cD///g/rZQiYeeDyYpyGyI+B5lsNf6F4hfRSE/iwSI8=; b=hubEFJNgtFTWOyoek7dHU98nJ/mZVfeR8Q53wVRHWzq9mYTbEiyMeJLS7/J0eONna4 E+3SQd+ypQWRGfZvD3ijUejfKAqQecaf0out4wQqkrGoWpu3FycQlVB/IJw8ZbtRPLVK Y3sFtFO6dcQj8smvvTBMrxNQpJ9EZXJv8X3CK4SgTYZTuiK0jKYC7tkpHTfr2acdTVhc cc31+GYQb66JoRS+53yiCfgchcmzGc8kREMnak+Ja7KeKOD+XA39y/MGCJKugGB7TsZU XC5W2pBVAHo30rabs8VMaX46USBXLDI6v8olnjopPzaIE0+nilueGPjuNh8TJsvH+X X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697695329; x=1698300129; 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:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=cD///g/rZQiYeeDyYpyGyI+B5lsNf6F4hfRSE/iwSI8=; b=VfUZCqNc6kb81A8DUWV/XEqCoB1dvMgTms4B8XoEYg+msjMEVM1B9r63zBGGyNlWrX AUQwpW5lvKZQFXDIMacLltclz0b7iz67aKhlvNUCZcvHkJXjFUFXWaZv29PkMvlx67/5 kfEZZWxqfZNymaEHLUimzr3WwWtPPf138d//5UUAU0zXieRcpzwuMCdgBkelmzFNngwL GBLrMKy9ivGRmHH26JBEn7Nmb/klmA4tl7IarTjtHT3i/8ZADXRhK92ubSKjl8tqzb7g JOswdN Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YyMlvmN2iZDHWtwsQ6PANr76GLogQ1PIPWXpFJj4/VIxQyzU3+G CiyQzMLVndh2ElQLh3evyvI= X-Google-Smtp-Source: AGHT+IHh1sf4quIldkHx7PNAmle4meiyHBoanUmYKYKiq5u5y+8U3KQG0d+54YA4wFIS++gqnF/UXw== X-Received: by 2002:a05:6a00:2490:b0:6bd:f224:c79e with SMTP id c16-20020a056a00249000b006bdf224c79emr1156839pfv.11.1697695328710; Wed, 18 Oct 2023 23:02:08 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aa7:8f15:0:b0:6b4:115c:3e95 with SMTP id x21-20020aa78f15000000b006b4115c3e95ls2687431pfr.1.-pod-prod-07-us; Wed, 18 Oct 2023 23:02:02 -0700 (PDT) X-Received: by 2002:a05:6a20:3d95:b0:14c:a53c:498c with SMTP id s21-20020a056a203d9500b0014ca53c498cmr1323129pzi.10.1697695322438; Wed, 18 Oct 2023 23:02:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697695322; cv=none; d=google.com; s=arc-20160816; b=c+6Eylk+DPMirRph0K/5BzJmxGfhy9FA14+YNTbfzJfy+cJI/mWv/Mluxw7EvXyH5Y ZQsU+w+9JZu8nydN8JsazVkxExW8uHIS2F784V1nWu5esLm8V4Y1LnkDuJlQsfJFvK4U Cwz6nwZaHBrf22Daibgru0Tilnyn+Nxikiu1NNGCcm2aP8w4lTXaMqpg1mZrqsgpyd02 xxMDmiTC+fdxxSVobOAq6njTCKWB1odkynHU5G0ljwDC+N36fUg4P90cloLlWtFe/T/2 s4BdA8fVgvJlOBEQFhO4wdiS9tygPGY/FCsR8WThNwvutbNpJ3WQtKl5Sg9gBeriFo5o Nklg== 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=FbzNzH9wmkpgExGjjOHoMGasTNV6pFZ3VZLSeSqUNdw=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=w3cJxTS+nVZF3a/spsThcxZJkvfyx8a/I+O+d6Q1DRQEPn7uO5b0KtICtancA1dFOd awSEft4MXUQT5uqy3qVgEsAlK8Z7hp6q73I5uyPCKY6hZV0cB3UIJRgdQJ0PizVzaPIV 5TUpAcHPXYslWk1R2i7IKd06+tWe/lBWPs8BWXiqB2zbHRnmT3UiYtGOSuItv6+csXYR i6muRJXc9oi4gaO4TyjlyOP9lrjIt9gSLpsfgsdVx/5UNwBQ2/iENFrDyfHzO7XVovLC Zq6zqytRvMkCpx7oMKI2p43riYpIVATd8yD5xEslxeAj/DELiGK94NuoRrItNgVeXrvd dBLw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mOwHzGuz; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::630 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-pl1-x630.google.com (mail-pl1-x630.google.com. [2607:f8b0:4864:20::630]) by gmr-mx.google.com with ESMTPS id qa9-20020a17090b4fc900b0025c1096a7a4si124146pjb.2.2023.10.18.23.02.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Oct 2023 23:02:02 -0700 (PDT) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::630 as permitted sender) client-ip=2607:f8b0:4864:20::630; Original-Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1caa7597af9so10730775ad.1 for ; Wed, 18 Oct 2023 23:02:02 -0700 (PDT) X-Received: by 2002:a17:902:da92:b0:1c6:19da:b29d with SMTP id j18-20020a170902da9200b001c619dab29dmr1269857plx.44.1697695321313; Wed, 18 Oct 2023 23:02:01 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:644:4701:23f0:2c35:ca0a:4c6d:d8a1]) by smtp.gmail.com with ESMTPSA id o12-20020a1709026b0c00b001c444f185b4sm942336plk.237.2023.10.18.23.02.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2023 23:02:00 -0700 (PDT) In-Reply-To: <1fa1b803-eced-48d5-b96d-153068eacd2bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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=20230601 header.b=mOwHzGuz; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::630 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:33201 Archived-At: You can try disabling raw_html: -t markdown_strict-raw_html > On Oct 18, 2023, at 10:35 PM, Kevin Keegan wrote: > > I am trying to convert some naif HTML snippets to markdown, everything works great expect for this strange behaviour that I am curious to know if I am missing something in pandoc or I need to fix it myself. > > Having this HTML snippet: > ``` >

Lorem ipsum dolor sit amet.

> ``` > > Using `link_attributes` extension, it returns: > ``` > $ printf '

Lorem ipsum dolor sit amet.

' | pandoc --from html --to markdown_strict+link_attributes > Lorem [ipsum](#) dolor [sit](#){.a} amet. > ``` > > By omitting it, it returns: > ``` > $ printf '

Lorem ipsum dolor sit amet.

' | pandoc --from html --to markdown_strict > Lorem [ipsum](#) dolor sit amet. > ``` > > I was wondering if there is a way by omitting the `link_attributes` extension to replace anyway the hyperlink with extra attributes, ignoring the latter. The desired result would be: > ``` > $ printf '

Lorem ipsum dolor sit amet.

' | pandoc --from html --to markdown_strict > Lorem [ipsum](#) dolor [sit](#) amet. > ``` > > Thank you. > > -- > 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/1fa1b803-eced-48d5-b96d-153068eacd2bn%40googlegroups.com.