Add support for mp3 sound links on cards (#26)

* Add support for mp3 sound links on cards

Per https://apps.ankiweb.net/docs/manual.html#importing-media the format for audio files is `[sound:myaudio.mp3]`. This allow anki-editor to export mp3 links such as `[[file:myaudio.mp3]]`in a form that they play nice with anki cards.
This commit is contained in:
Alex Henning 2018-08-11 18:52:53 -07:00 committed by Lei Tan
parent d5007efab3
commit b533c9899c

View file

@ -314,6 +314,10 @@ The implementation is borrowed and simplified from ox-html."
link (plist-get info :html-inline-image-rules)))
(org-html--format-image path attributes-plist info))
;; Audio file.
((string-suffix-p ".mp3" path t)
(format "[sound:%s]" path))
;; External link with a description part.
((and path desc) (format "<a href=\"%s\"%s>%s</a>"
(org-html-encode-plain-text path)