From: Kevin Keegan <poowaq-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Ignore link attributes and always match a hyperlink or image
Date: Wed, 18 Oct 2023 23:30:58 -0700 (PDT) [thread overview]
Message-ID: <41091039-be55-4692-bed4-e87aef240f14n@googlegroups.com> (raw)
In-Reply-To: <3BE27726-13AE-4F51-8BB9-E729A21A62B8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2518 bytes --]
Thanks, I didn't expect that from reading the `raw_html` documentation.
On Thursday, October 19, 2023 at 8:02:08 AM UTC+2 John MacFarlane wrote:
> You can try disabling raw_html: -t markdown_strict-raw_html
>
> > On Oct 18, 2023, at 10:35 PM, Kevin Keegan <poo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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:
> > ```
> > <p>Lorem <a href="#">ipsum</a> dolor <a href="#" class="a">sit</a>
> amet.</p>
> > ```
> >
> > Using `link_attributes` extension, it returns:
> > ```
> > $ printf '<p>Lorem <a href="#">ipsum</a> dolor <a href="#"
> class="a">sit</a> amet.</p>' | pandoc --from html --to
> markdown_strict+link_attributes
> > Lorem [ipsum](#) dolor [sit](#){.a} amet.
> > ```
> >
> > By omitting it, it returns:
> > ```
> > $ printf '<p>Lorem <a href="#">ipsum</a> dolor <a href="#"
> class="a">sit</a> amet.</p>' | pandoc --from html --to markdown_strict
> > Lorem [ipsum](#) dolor <a href="#" class="a">sit</a> 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 '<p>Lorem <a href="#">ipsum</a> dolor <a href="#"
> class="a">sit</a> amet.</p>' | 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-discus...-/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
> .
>
>
--
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/41091039-be55-4692-bed4-e87aef240f14n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 3925 bytes --]
prev parent reply other threads:[~2023-10-19 6:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 5:35 Kevin Keegan
[not found] ` <1fa1b803-eced-48d5-b96d-153068eacd2bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-10-19 6:01 ` John MacFarlane
[not found] ` <3BE27726-13AE-4F51-8BB9-E729A21A62B8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-10-19 6:30 ` Kevin Keegan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41091039-be55-4692-bed4-e87aef240f14n@googlegroups.com \
--to=poowaq-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).