html: Support links with image descriptions
Turns out Org mode supports image links natively and we don't have to go out of spec! From https://orgmode.org/manual/Images-in-HTML-export.html: [...] if the description part of the Org link is itself another link, such as ‘file:’ or ‘http:’ URL pointing to an image, the HTML export back-end in-lines this image and links to [...]
This commit is contained in:
parent
c536adf6e9
commit
d85768891c
5 changed files with 33 additions and 10 deletions
3
org/testdata/inline.html
vendored
3
org/testdata/inline.html
vendored
|
@ -76,6 +76,9 @@ not emphasized/</p>
|
|||
<p>regular link to https (image) <img src="https://placekitten.com/200/200#.png" alt="https://placekitten.com/200/200#.png" title="https://placekitten.com/200/200#.png" /></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>regular link with image as description <a href="https://placekitten.com"><img src="https://placekitten.com/200/200#.png" alt="https://placekitten.com/200/200#.png" /></a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>regular link enclosed in [] [<a href="https://www.example.com">https://www.example.com</a>] [<a href="https://www.example.com">example.com</a>]</p>
|
||||
</li>
|
||||
<li>
|
||||
|
|
5
org/testdata/inline.org
vendored
5
org/testdata/inline.org
vendored
|
@ -28,8 +28,9 @@
|
|||
4. regular link to a file (video) [[my-video.mp4]]
|
||||
5. regular link to http (image) [[http://placekitten.com/200/200#.png]]
|
||||
6. regular link to https (image) [[https://placekitten.com/200/200#.png]]
|
||||
7. regular link enclosed in [] [[[https://www.example.com]]] [[[https://www.example.com][example.com]]]
|
||||
8. auto link, i.e. not inside =\[[square brackets]\]= https://www.example.com
|
||||
7. regular link with image as description [[https://placekitten.com][https://placekitten.com/200/200#.png]]
|
||||
8. regular link enclosed in [] [[[https://www.example.com]]] [[[https://www.example.com][example.com]]]
|
||||
9. auto link, i.e. not inside =\[[square brackets]\]= https://www.example.com
|
||||
- timestamps
|
||||
- <2019-01-06>
|
||||
- <2019-01-06 Sun>
|
||||
|
|
5
org/testdata/inline.pretty_org
vendored
5
org/testdata/inline.pretty_org
vendored
|
@ -28,8 +28,9 @@
|
|||
4. regular link to a file (video) [[my-video.mp4]]
|
||||
5. regular link to http (image) [[http://placekitten.com/200/200#.png]]
|
||||
6. regular link to https (image) [[https://placekitten.com/200/200#.png]]
|
||||
7. regular link enclosed in [] [[[https://www.example.com]]] [[[https://www.example.com][example.com]]]
|
||||
8. auto link, i.e. not inside =\[[square brackets]\]= https://www.example.com
|
||||
7. regular link with image as description [[https://placekitten.com][https://placekitten.com/200/200#.png]]
|
||||
8. regular link enclosed in [] [[[https://www.example.com]]] [[[https://www.example.com][example.com]]]
|
||||
9. auto link, i.e. not inside =\[[square brackets]\]= https://www.example.com
|
||||
- timestamps
|
||||
- <2019-01-06 Sun>
|
||||
- <2019-01-06 Sun>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue