emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] Fix ox-md remote image links export


From: Jay Kamat
Subject: [O] [PATCH] Fix ox-md remote image links export
Date: Sat, 5 Aug 2017 19:43:04 -0700

Hi!

I discovered a bug in the ox-md exporter and have created a patch to fix it:

Previously, this image link:
[[https://git-scm.com/images/address@hidden

would export to:
![img](//git-scm.com/images/address@hidden)

which is an invalid markdown image, and won't display properly in
browsers and other places.

A workaround (which I have been using extremely heavily), is:
[[file:https://git-scm.com/images/address@hidden

which exports to
![img](https://git-scm.com/images/address@hidden)

Which is the proper (unbroken) image link.

I have attached a patch which fixes the first example, so it exports
the same link as the workaround (and is no longer broken).

One of my concerns with the attached patch is whether there's a better
way to determine if a link is 'remote'. Maybe I should make a constant
in the file listing 'remote' types and use that everywhere.
I'm also not sure if I broke any other type of image link (but the
simple local case seems to work fine).

My papers are currently being processed, but I thought I would post
this patch early to get feedback, since ideally I would like this bug
to be fixed as soon as possible :). Hopefully they'll be done before
the review is completed.

Let me know if you see anything wrong, and thanks again for hacking org mode :D.

-Jay

Attachment: 0001-ox-md.el-Fix-exporting-of-remote-image-links.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]