public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "balaj...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <balaji.dutt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Removing local URL protocols when converting to HTML?
Date: Tue, 20 Dec 2022 02:32:23 -0800 (PST)	[thread overview]
Message-ID: <115263e1-d1c1-45b6-b812-bce6f074f459n@googlegroups.com> (raw)
In-Reply-To: <87sfhatx3m.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 2570 bytes --]

Worked well enough for me. Thank you very much!

On Tuesday, 20 December 2022 at 14:20:37 UTC+8 Albert Krewinkel wrote:

> You probably want a filter like this (untested):
>
> ``` lua
> function Link (link)
> if link.target:match '^outlook:' then
> return link.content
> end
> end
> ```
>
> Balaji Dutt <balaj...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Hello,
> >
> >
> > I am using Dendron as a personal knowledge management solution and
> > from time to time, need to send some meeting notes that I take to
> > others. Typically, my meeting notes will look something like this:
> >
> >
> > #### Notes
> > 1. Steal Underpants
> > 2. ???
> > 3. Profit!
> >
> > #### References
> > - [Plan for world domination](outlook:<GUID>)
> > - [Contingency Plan](https://www.example.com)
> >
> >
> > As you can see the "References" section includes a "link" to an
> > Outlook GUID. I'm using the Outlook Protocol handler (More info) to
> > deep link to specific messages in my Inbox.
> >
> > Now while this works really nicely for me, it's not very useful when
> > I share my notes with others. I'm trying to figure out if there's a
> > way for me in Pandoc to setup a filter such that if Pandoc encounters
> > these type of "outlook" links, it deletes the link leaving just the
> > Link description. In other words, the output HTML for the above
> > example would (ideally) look like this:
> >
> >
> > <h4 id="references>References</h4>
> > <ul>
> > <li>[Plan for world domination]</li>
> > <li><a href="https://www.example.com>Contingency Plan</a></li>
> > </ul>
> >
> >
> > I've tried various combinations of keywords on "url", "filter",
> > "link" etc but that has not yielded much result. I'm pretty sure this
> > is not a very common problem and hence I'm hoping the group can help
> > me figure out.
> >
> > I should also say as I'm using pandoc at my $dayjob which is a
> > heavily restricted environment, I'm limited to an extremely old
> > version of pandoc (v2.2.3) which is very unfortunate but also not
> > easily resolvable.
> >
> > -- 
> > Balaji Dutt
>
>
> -- 
> Albert Krewinkel
> GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124
>

-- 
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/115263e1-d1c1-45b6-b812-bce6f074f459n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 4105 bytes --]

      parent reply	other threads:[~2022-12-20 10:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20  3:41 Balaji Dutt
     [not found] ` <732b167f-0380-8ba6-9385-762601ee4b56-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-12-20  6:18   ` Albert Krewinkel
     [not found]     ` <87sfhatx3m.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-12-20 10:32       ` balaj...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [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=115263e1-d1c1-45b6-b812-bce6f074f459n@googlegroups.com \
    --to=balaji.dutt-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).